Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
fix(app): Use boolean prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
passy committed May 17, 2013
1 parent df24c7c commit da89e70
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ Generator.prototype.askForBootstrap = function askForBootstrap() {
this.prompt({
name: 'bootstrap',
message: 'Would you like to include Twitter Bootstrap?',
default: 'Y/n',
default: true,
warning: 'Yes: All Twitter Bootstrap files will be placed into the styles directory.'
}, function (err, props) {
if (err) {
return this.emit('error', err);
}

this.bootstrap = (/y/i).test(props.bootstrap);
this.bootstrap = props.bootstrap;

cb();
}.bind(this));
Expand All @@ -98,14 +98,14 @@ Generator.prototype.askForCompass = function askForCompass() {
this.prompt({
name: 'compassBootstrap',
message: 'If so, would you like to use Twitter Bootstrap for Compass (as opposed to vanilla CSS)?',
default: 'Y/n',
default: true,
warning: 'Yes: All Twitter Bootstrap files will be placed into the styles directory.'
}, function (err, props) {
if (err) {
return this.emit('error', err);
}

this.compassBootstrap = (/y/i).test(props.compassBootstrap);
this.compassBootstrap = props.compassBootstrap;

cb();
}.bind(this));
Expand All @@ -117,17 +117,17 @@ Generator.prototype.askForModules = function askForModules() {
var prompts = [{
name: 'resourceModule',
message: 'Would you like to include angular-resource.js?',
default: 'Y/n',
default: true,
warning: 'Yes: angular-resource added to bower.json'
}, {
name: 'cookiesModule',
message: 'Would you like to include angular-cookies.js?',
default: 'Y/n',
default: true,
warning: 'Yes: angular-cookies added to bower.json'
}, {
name: 'sanitizeModule',
message: 'Would you like to include angular-sanitize.js?',
default: 'Y/n',
default: true,
warning: 'Yes: angular-sanitize added to bower.json'
}];

Expand All @@ -136,9 +136,9 @@ Generator.prototype.askForModules = function askForModules() {
return this.emit('error', err);
}

this.resourceModule = (/y/i).test(props.resourceModule);
this.cookiesModule = (/y/i).test(props.cookiesModule);
this.sanitizeModule = (/y/i).test(props.sanitizeModule);
this.resourceModule = props.resourceModule;
this.cookiesModule = props.cookiesModule;
this.sanitizeModule = props.sanitizeModule;

cb();
}.bind(this));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test": "mocha"
},
"dependencies": {
"yeoman-generator": "~0.10.5"
"yeoman-generator": "~0.11.0"
},
"peerDependencies": {
"generator-karma": "~0.2.0"
Expand Down

0 comments on commit da89e70

Please sign in to comment.