File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,31 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
2222 this . appPath = this . env . options . appPath ;
2323 this . pkg = require ( '../package.json' ) ;
2424 this . filters = { } ;
25- // skip config if filters are already defined
26- if ( this . config . get ( 'filters' ) ) {
27- this . log ( '\nUsing existing yo-rc config.\n' ) ;
28- this . skipConfig = true ;
29- }
3025 } ,
3126
3227 info : function ( ) {
3328 this . log ( this . yeoman ) ;
3429 this . log ( 'Out of the box I create an AngularJS app with an Express server.\n' ) ;
3530 } ,
3631
32+ checkForConfig : function ( ) {
33+ var cb = this . async ( ) ;
34+
35+ if ( this . config . get ( 'filters' ) ) {
36+ this . prompt ( [ {
37+ type : "confirm" ,
38+ name : "skipConfig" ,
39+ message : "Existing .yo-rc configuration found, would you like to use it?" ,
40+ default : true ,
41+ } ] , function ( answers ) {
42+ this . skipConfig = answers . skipConfig ;
43+ cb ( ) ;
44+ } . bind ( this ) ) ;
45+ } else {
46+ cb ( ) ;
47+ }
48+ } ,
49+
3750 clientPrompts : function ( ) {
3851 if ( this . skipConfig ) return ;
3952 var cb = this . async ( ) ;
You can’t perform that action at this time.
0 commit comments