File tree 7 files changed +31
-16
lines changed
7 files changed +31
-16
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,25 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
87
87
message : "What Angular router would you like to use?" ,
88
88
choices : [ "ngRoute" , "uiRouter" ] ,
89
89
filter : function ( val ) { return val . toLowerCase ( ) ; }
90
+ } , {
91
+ type : "confirm" ,
92
+ name : "bootstrap" ,
93
+ message : "Would you like to include Bootstrap?"
94
+ } , {
95
+ type : "confirm" ,
96
+ name : "uibootstrap" ,
97
+ message : "Would you like to include UI Bootstrap?" ,
98
+ when : function ( answers ) {
99
+ return answers . bootstrap ;
100
+ }
90
101
} ] , function ( answers ) {
91
102
this . filters [ answers . script ] = true ;
92
103
this . filters [ answers . markup ] = true ;
93
104
this . filters [ answers . stylesheet ] = true ;
94
105
this . filters [ answers . router ] = true ;
95
- cb ( ) ;
106
+ if ( answers . bootstrap ) this . filters [ answers . bootstrap ] = true ;
107
+ if ( answers . uibootstrap ) this . filters [ answers . uibootstrap ] = true ;
108
+ cb ( ) ;
96
109
} . bind ( this ) ) ;
97
110
} ,
98
111
@@ -209,12 +222,12 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
209
222
var angModules = [
210
223
"'ngCookies'" ,
211
224
"'ngResource'" ,
212
- "'ngSanitize'" ,
213
- "'ui.bootstrap'"
225
+ "'ngSanitize'"
214
226
] ;
215
227
if ( this . filters [ 'ngroute' ] ) angModules . push ( "'ngRoute'" ) ;
216
228
if ( this . filters [ 'socketio' ] ) angModules . push ( "'btford.socket-io'" ) ;
217
229
if ( this . filters [ 'uirouter' ] ) angModules . push ( "'ui.router'" ) ;
230
+ if ( this . filters [ 'uibootstrap' ] ) angModules . push ( "'ui.bootstrap'" ) ;
218
231
219
232
this . angularModules = "\n " + angModules . join ( ",\n " ) + "\n" ;
220
233
} ,
Original file line number Diff line number Diff line change 5
5
"angular" : " >=1.2.*" ,
6
6
"json3" : " ~3.3.1" ,
7
7
"es5-shim" : " ~3.0.1" ,
8
- "jquery" : " ~1.11.0" ,
8
+ "jquery" : " ~1.11.0" ,<% if(filters.bootstrap) { %>
9
9
"bootstrap-sass-official" : " ~3.1.1" ,
10
- "bootstrap" : " ~3.1.1" ,
10
+ "bootstrap" : " ~3.1.1" ,<% } %>
11
11
"angular-resource" : " >=1.2.*" ,
12
12
"angular-cookies" : " >=1.2.*" ,
13
13
"angular-sanitize" : " >=1.2.*" ,<% if(filters.ngroute) { %>
14
- "angular-route" : " >=1.2.*" ,<% } %>
15
- "angular-bootstrap" : " ~0.11.0" ,
14
+ "angular-route" : " >=1.2.*" ,<% } %><% if(filters.uibootstrap) { %>
15
+ "angular-bootstrap" : " ~0.11.0" ,<% } %>
16
16
"font-awesome" : " >=4.1.0" ,
17
17
"lodash" : " ~2.4.1" <% if(filters.socketio) { %>,
18
18
"angular-socket-io" : " ~0.6.0" <% } %><% if(filters.uirouter) { %>,
Original file line number Diff line number Diff line change
1
+ < % if(filters.bootstrap ) { %>
1
2
// Colors
2
3
// --------------------------------------------------
3
4
34
35
35
36
.btn-google-plus {
36
37
.button-variant (@btnText ; @btnGooglePlusBackground ; @btnGooglePlusBackgroundHighlight );
37
- }
38
+ }< % } % >
Original file line number Diff line number Diff line change
1
+ <% if(filters.bootstrap ) { %>
1
2
// Colors
2
3
// --------------------------------------------------
3
4
@@ -34,4 +35,4 @@ $btnGooglePlusBackgroundHighlight: #c53727;
34
35
35
36
.btn-google-plus {
36
37
@include button-variant ($btnText , $btnGooglePlusBackground , $btnGooglePlusBackgroundHighlight );
37
- }
38
+ }<% } %>
Original file line number Diff line number Diff line change 1
- @import ' bootstrap/less/bootstrap.less' ;
1
+ < % if(filters .bootstrap ) { % > @import ' bootstrap/less/bootstrap.less' ;< % } % >
2
2
@import ' font-awesome/less/font-awesome.less' ;
3
3
4
- @icon-font-path : ' /bower_components/bootstrap/fonts/' ;
4
+ < % if(filters .bootstrap ) { % > @icon-font-path : ' /bower_components/bootstrap/fonts/' ;< % } % >
5
5
@fa-font-path : ' /bower_components/font-awesome/fonts' ;
6
6
7
7
/* *
Original file line number Diff line number Diff line change 1
- $icon-font-path : " /bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/" ;
1
+ <% if(filters .bootstrap ) { %> $icon-font-path : " /bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/" ;<% } %>
2
2
$fa-font-path : " /bower_components/font-awesome/fonts" ;
3
-
4
- @import ' bootstrap-sass-official/vendor/assets/stylesheets/bootstrap' ;
3
+ <% if(filters .bootstrap ) { %>
4
+ @import ' bootstrap-sass-official/vendor/assets/stylesheets/bootstrap' ;<% } %>
5
5
@import ' font-awesome/scss/font-awesome' ;
6
6
7
7
/* *
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ module.exports = function(config) {
17
17
'client/bower_components/angular-resource/angular-resource.js' ,
18
18
'client/bower_components/angular-cookies/angular-cookies.js' ,
19
19
'client/bower_components/angular-sanitize/angular-sanitize.js' ,
20
- 'client/bower_components/angular-route/angular-route.js' ,
21
- 'client/bower_components/angular-bootstrap/ui-bootstrap-tpls.js' ,
20
+ 'client/bower_components/angular-route/angular-route.js' , < % if ( filters . uibootstrap ) { % >
21
+ 'client/bower_components/angular-bootstrap/ui-bootstrap-tpls.js' , < % } % >
22
22
'client/bower_components/lodash/dist/lodash.compat.js',< % if ( filters . socketio ) { % >
23
23
'client/bower_components/angular-socket-io/socket.js',< % } % > < % if ( filters . uirouter ) { % >
24
24
'client/bower_components/angular-ui-router/release/angular-ui-router.js',< % } % >
You can’t perform that action at this time.
0 commit comments