File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ export default class Generator extends Base {
44
44
45
45
checkForConfig : function ( ) {
46
46
var cb = this . async ( ) ;
47
+ var existingFilters = this . config . get ( 'filters' ) ;
47
48
48
- if ( this . config . get ( 'filters' ) ) {
49
+ if ( existingFilters ) {
49
50
this . prompt ( [ {
50
51
type : 'confirm' ,
51
52
name : 'skipConfig' ,
@@ -54,14 +55,14 @@ export default class Generator extends Base {
54
55
} ] , function ( answers ) {
55
56
this . skipConfig = answers . skipConfig ;
56
57
57
- this . filters = this . lodash . defaults ( this . config . get ( 'filters' ) , {
58
- bootstrap : true ,
59
- uibootstrap : true ,
60
- jasmine : true
61
- } ) ;
62
-
63
- this . config . set ( 'filters' , this . filters ) ;
64
- this . config . forceSave ( ) ;
58
+ if ( this . skipConfig ) {
59
+ this . filters = existingFilters ;
60
+ } else {
61
+ this . filters = { } ;
62
+ this . forceConfig = true ;
63
+ this . config . set ( 'filters' , this . filters ) ;
64
+ this . config . forceSave ( ) ;
65
+ }
65
66
66
67
cb ( ) ;
67
68
} . bind ( this ) ) ;
@@ -357,7 +358,8 @@ export default class Generator extends Base {
357
358
'serviceDirectory' : appPath ,
358
359
'filters' : filters ,
359
360
'extensions' : extensions ,
360
- 'basePath' : 'client'
361
+ 'basePath' : 'client' ,
362
+ 'forceConfig' : this . forceConfig
361
363
}
362
364
} , { local : require . resolve ( 'generator-ng-component/app/index.js' ) } ) ;
363
365
} ,
You can’t perform that action at this time.
0 commit comments