File tree 1 file changed +6
-14
lines changed
1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -92,21 +92,13 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
92
92
type : 'list' ,
93
93
name : 'script' ,
94
94
message : 'What would you like to write scripts with?' ,
95
- choices : [ 'JavaScript' , 'CoffeeScript' ] ,
95
+ choices : [ 'JavaScript' , 'JavaScript + Babel' , ' CoffeeScript'] ,
96
96
filter : function ( val ) {
97
- var filterMap = {
97
+ return {
98
98
'JavaScript' : 'js' ,
99
+ 'JavaScript + Babel' : 'babel' ,
99
100
'CoffeeScript' : 'coffee'
100
- } ;
101
-
102
- return filterMap [ val ] ;
103
- }
104
- } , {
105
- type : 'confirm' ,
106
- name : 'babel' ,
107
- message : 'Would you like to use Javascript ES6 in your client by preprocessing it with Babel?' ,
108
- when : function ( answers ) {
109
- return answers . script === 'js' ;
101
+ } [ val ] ;
110
102
}
111
103
} , {
112
104
type : 'list' ,
@@ -141,8 +133,8 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
141
133
}
142
134
} ] , function ( answers ) {
143
135
144
- this . filters . babel = ! ! answers . babel ;
145
- if ( this . filters . babel ) { this . filters . js = true ; }
136
+ // also set 'js' to true if using babel
137
+ if ( answers . script === ' babel' ) { this . filters . js = true ; }
146
138
this . filters [ answers . script ] = true ;
147
139
this . filters [ answers . markup ] = true ;
148
140
this . filters [ answers . stylesheet ] = true ;
You can’t perform that action at this time.
0 commit comments