File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Expand file tree Collapse file tree 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({
9292 type : 'list' ,
9393 name : 'script' ,
9494 message : 'What would you like to write scripts with?' ,
95- choices : [ 'JavaScript' , 'CoffeeScript' ] ,
95+ choices : [ 'JavaScript' , 'JavaScript + Babel' , ' CoffeeScript'] ,
9696 filter : function ( val ) {
97- var filterMap = {
97+ return {
9898 'JavaScript' : 'js' ,
99+ 'JavaScript + Babel' : 'babel' ,
99100 '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 ] ;
110102 }
111103 } , {
112104 type : 'list' ,
@@ -141,8 +133,8 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
141133 }
142134 } ] , function ( answers ) {
143135
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 ; }
146138 this . filters [ answers . script ] = true ;
147139 this . filters [ answers . markup ] = true ;
148140 this . filters [ answers . stylesheet ] = true ;
You can’t perform that action at this time.
0 commit comments