File tree 1 file changed +20
-1
lines changed 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
var generators = require ( 'yeoman-generator' ) ;
3
+ var chalk = require ( 'chalk' ) ;
3
4
4
5
module . exports = generators . Base . extend ( {
5
6
constructor : function ( ) {
6
7
generators . Base . apply ( this , arguments ) ;
7
8
9
+ this . option ( 'skip-install-message' , {
10
+ desc : 'Skip the post-install message' ,
11
+ type : Boolean ,
12
+ default : true
13
+ } ) ;
14
+
8
15
this . option ( 'skip-install' , {
9
16
desc : 'Skip installing dependencies' ,
10
17
type : Boolean
@@ -45,8 +52,20 @@ module.exports = generators.Base.extend({
45
52
install : function ( ) {
46
53
this . installDependencies ( {
47
54
bower : false ,
55
+ skipMessage : this . options [ 'skip-install-message' ] ,
48
56
skipInstall : this . options [ 'skip-install' ]
49
57
} ) ;
50
58
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
+ }
52
71
} ) ;
You can’t perform that action at this time.
0 commit comments