Skip to content

Commit

Permalink
feat(generator): add run npm install confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghuabei committed Oct 25, 2016
1 parent 634ba76 commit 30c7022
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ const QUESTIONS = [
'MPL-2.0',
'Unlicense'
]
},
{
type: 'confirm',
name: 'runNPMInstall',
message: 'Do you want to run npm install after generated?'
}
];

Expand Down Expand Up @@ -107,7 +112,9 @@ module.exports = class AppGenerator extends Base {
}

install() {
this.npmInstall();
if (this.answers.runNPMInstall) {
this.npmInstall();
}
}

end() {
Expand Down

0 comments on commit 30c7022

Please sign in to comment.