File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,10 +66,17 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
6666 this . log ( '# Client\n' ) ;
6767
6868 this . prompt ( [ {
69- type : 'confirm ' ,
70- name : 'gulp ' ,
69+ type : 'list ' ,
70+ name : 'buildtool ' ,
7171 message : 'Would you like to use Gulp (experimental) instead of Grunt?' ,
72- default : false
72+ choices : [ 'Grunt' , 'Gulp' , 'Both' ] ,
73+ filter : function ( val ) {
74+ return {
75+ 'Grunt' : 'grunt' ,
76+ 'Gulp' : 'gulp' ,
77+ 'Both' : 'grunt_and_gulp'
78+ } [ val ] ;
79+ }
7380 } , {
7481 type : "list" ,
7582 name : "script" ,
@@ -122,16 +129,17 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
122129 return answers . bootstrap ;
123130 }
124131 } ] , function ( answers ) {
125- this . filters . gulp = ! ! answers . gulp ;
132+ this . filters . grunt = answers . buildtool === 'grunt' || answers . buildtool === 'grunt_and_gulp' ;
133+ this . filters . gulp = answers . buildtool === 'gulp' || answers . buildtool === 'grunt_and_gulp' ;
126134 this . filters . babel = ! ! answers . babel ;
127- if ( this . filters . babel ) { this . filters . js = true ; }
135+ if ( this . filters . babel ) { this . filters . js = false ; }
128136 this . filters [ answers . script ] = true ;
129137 this . filters [ answers . markup ] = true ;
130138 this . filters [ answers . stylesheet ] = true ;
131139 this . filters [ answers . router ] = true ;
132140 this . filters . bootstrap = ! ! answers . bootstrap ;
133141 this . filters . uibootstrap = ! ! answers . uibootstrap ;
134- cb ( ) ;
142+ cb ( ) ;
135143 } . bind ( this ) ) ;
136144 } ,
137145
Original file line number Diff line number Diff line change 6666 "nib" : " ^1.1.0" ,<% } %><% if(filters.sass) { %>
6767 "gulp-sass" : " ^2.0.1" ,<% } %><% if(filters.coffee) { %>
6868 "gulp-coffeelint" : " ^0.5.0" ,
69- "gulp-coffee" : " ^2.3.1" ,<% } %><% } else { %>
69+ "gulp-coffee" : " ^2.3.1" ,<% }} if(filters.grunt) { %>
7070 "grunt" : " ~0.4.4" ,
7171 "grunt-autoprefixer" : " ~0.7.2" ,
7272 "grunt-wiredep" : " ~1.8.0" ,
You can’t perform that action at this time.
0 commit comments