Skip to content

Commit 731444c

Browse files
committed
set defaults for bootstrap config
1 parent 87e77a1 commit 731444c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: app/index.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
2222
this.scriptAppName = this.appname + genUtils.appName(this);
2323
this.appPath = this.env.options.appPath;
2424
this.pkg = require('../package.json');
25+
2526
this.filters = {};
2627
},
2728

@@ -103,8 +104,8 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
103104
this.filters[answers.markup] = true;
104105
this.filters[answers.stylesheet] = true;
105106
this.filters[answers.router] = true;
106-
if(answers.bootstrap) this.filters['bootstrap'] = true;
107-
if(answers.uibootstrap) this.filters['uibootstrap'] = true;
107+
this.filters['bootstrap'] = answers.bootstrap;
108+
this.filters['uibootstrap'] = answers.uibootstrap;
108109
cb();
109110
}.bind(this));
110111
},
@@ -218,7 +219,11 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
218219
},
219220

220221
ngModules: function() {
221-
this.filters = this.config.get('filters');
222+
this.filters = this._.defaults(this.config.get('filters'), {
223+
bootstrap: true,
224+
uibootstrap: true
225+
});
226+
222227
var angModules = [
223228
"'ngCookies'",
224229
"'ngResource'",

0 commit comments

Comments
 (0)