Skip to content

Commit e9f4f37

Browse files
committed
Add skip install message
1 parent 7f6ea43 commit e9f4f37

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

generators/update/index.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
'use strict';
22
var generators = require('yeoman-generator');
3+
var chalk = require('chalk');
34

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

9+
this.option('skip-install-message', {
10+
desc: 'Skip the post-install message',
11+
type: Boolean,
12+
default: true
13+
});
14+
815
this.option('skip-install', {
916
desc: 'Skip installing dependencies',
1017
type: Boolean
@@ -45,8 +52,20 @@ module.exports = generators.Base.extend({
4552
install: function () {
4653
this.installDependencies({
4754
bower: false,
55+
skipMessage: this.options['skip-install-message'],
4856
skipInstall: this.options['skip-install']
4957
});
5058
this.spawnCommand('bundle', ['install', '--quiet']);
51-
}
59+
},
60+
61+
end: function () {
62+
var skipInstallMessage =
63+
'\nPlease run ' + chalk.blue('npm install') + ' and ' +
64+
chalk.blue('bundle install') + ' to install dependencies\n';
65+
66+
if (this.options['skip-install']) {
67+
this.log(skipInstallMessage);
68+
return;
69+
}
70+
}
5271
});

0 commit comments

Comments
 (0)