Skip to content

Commit

Permalink
Add skip install message
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed Jun 5, 2016
1 parent 7f6ea43 commit e9f4f37
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion generators/update/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
'use strict';
var generators = require('yeoman-generator');
var chalk = require('chalk');

module.exports = generators.Base.extend({
constructor: function () {
generators.Base.apply(this, arguments);

this.option('skip-install-message', {
desc: 'Skip the post-install message',
type: Boolean,
default: true
});

this.option('skip-install', {
desc: 'Skip installing dependencies',
type: Boolean
Expand Down Expand Up @@ -45,8 +52,20 @@ module.exports = generators.Base.extend({
install: function () {
this.installDependencies({
bower: false,
skipMessage: this.options['skip-install-message'],
skipInstall: this.options['skip-install']
});
this.spawnCommand('bundle', ['install', '--quiet']);
}
},

end: function () {
var skipInstallMessage =
'\nPlease run ' + chalk.blue('npm install') + ' and ' +
chalk.blue('bundle install') + ' to install dependencies\n';

if (this.options['skip-install']) {
this.log(skipInstallMessage);
return;
}
}
});

0 comments on commit e9f4f37

Please sign in to comment.