@@ -52,15 +52,23 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
52
52
} ] , function ( answers ) {
53
53
this . skipConfig = answers . skipConfig ;
54
54
55
+ this . filters = this . _ . defaults ( this . config . get ( 'filters' ) , {
56
+ bootstrap : true ,
57
+ uibootstrap : true ,
58
+ jasmine : true
59
+ } ) ;
60
+
55
61
// NOTE: temp(?) fix for #403
56
- if ( typeof this . oauth === 'undefined' ) {
62
+ if ( typeof this . filters . oauth === 'undefined' ) {
57
63
var strategies = Object . keys ( this . filters ) . filter ( function ( key ) {
58
64
return key . match ( / A u t h $ / ) && key ;
59
65
} ) ;
60
66
61
- if ( strategies . length ) this . config . set ( ' oauth' , true ) ;
67
+ if ( strategies . length ) this . filters . oauth = true ;
62
68
}
63
69
70
+ this . config . forceSave ( ) ;
71
+
64
72
cb ( ) ;
65
73
} . bind ( this ) ) ;
66
74
} else {
@@ -228,9 +236,17 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
228
236
}
229
237
} ] , function ( answers ) {
230
238
this . filters [ answers . testing ] = true ;
231
- if ( this . filters . mocha ) {
239
+ if ( answers . testing === 'mocha' ) {
240
+ this . filters . jasmine = false ;
241
+ this . filters . should = false ;
242
+ this . filters . expect = false ;
232
243
this . filters [ answers . chai ] = true ;
233
244
}
245
+ if ( answers . testing === 'jasmine' ) {
246
+ this . filters . mocha = false ;
247
+ this . filters . should = false ;
248
+ this . filters . expect = false ;
249
+ }
234
250
235
251
cb ( ) ;
236
252
} . bind ( this ) ) ;
@@ -289,11 +305,6 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
289
305
} ,
290
306
291
307
ngModules : function ( ) {
292
- this . filters = this . _ . defaults ( this . config . get ( 'filters' ) , {
293
- bootstrap : true ,
294
- uibootstrap : true
295
- } ) ;
296
-
297
308
var angModules = [
298
309
"'ngCookies'" ,
299
310
"'ngResource'" ,
0 commit comments