File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ class NgxGenerator extends Generator {
145145 this . props . usePrefix = typeof this . props . usePrefix === 'boolean' ? this . props . usePrefix : true ;
146146 this . props . deploy = this . props . deploy || 'none' ;
147147 this . props . features = this . props . features || [ ] ;
148+ this . props . pwa = this . props . features . includes ( 'pwa' ) ;
148149 this . props . auth = this . props . features . includes ( 'auth' ) ;
149150 this . props . lazy = this . props . features . includes ( 'lazy' ) ;
150151 this . props . e2e = this . props . features . includes ( 'e2e' ) ;
Original file line number Diff line number Diff line change @@ -27,13 +27,6 @@ module.exports = [
2727 }
2828 ]
2929 } ,
30- {
31- type : 'confirm' ,
32- name : 'pwa' ,
33- message : 'Do you want a progressive web app? (with manifest and service worker)' ,
34- default : true ,
35- when : ( props ) => props . target && props . target . includes ( 'web' )
36- } ,
3730 {
3831 type : 'checkbox' ,
3932 name : 'mobile' ,
@@ -125,6 +118,12 @@ module.exports = [
125118 name : 'features' ,
126119 message : 'Which features do you need?' ,
127120 choices : [
121+ {
122+ value : 'pwa' ,
123+ message : 'Progressive Web App (add manifest and service worker)' ,
124+ checked : true ,
125+ when : props . target && props . target . includes ( 'web' )
126+ } ,
128127 {
129128 value : 'auth' ,
130129 name : 'Authentication' ,
@@ -144,7 +143,7 @@ module.exports = [
144143 value : 'angulartics' ,
145144 name : 'Analytics (with Angulartics2)?'
146145 }
147- ]
146+ ] . filter ( ( choice ) => choice . when )
148147 } ,
149148 {
150149 type : 'checkbox' ,
You can’t perform that action at this time.
0 commit comments