diff --git a/lib/creator/yeoman/webpack-generator.js b/lib/creator/yeoman/webpack-generator.js index 809a8eb8e16..dd3841f7cf0 100644 --- a/lib/creator/yeoman/webpack-generator.js +++ b/lib/creator/yeoman/webpack-generator.js @@ -107,12 +107,29 @@ module.exports = class WebpackGenerator extends Generator { }); } installPlugins() { + let asyncDone = this.async(); this.npmInstall(['uglifyjs-webpack-plugin'], { 'save-dev': true }); this.configuration.config.webpackOptions.plugins.forEach( (plugin) => { if(plugin.indexOf('new ExtractTextPlugin') >= 0) { this.npmInstall(['extract-text-webpack-plugin'], { 'save-dev': true }); } }); + this.prompt([ + RawList( + 'finish', + 'Everything is set! Do you want to create your webpack.config.js?', + ['Yes', 'No'] + ) + ]).then( (answer) => { + if(answer['finish'] === 'Yes') { + asyncDone(); + } else { + process.stdout.write( + chalk.bold.red('\nInitializing aborted, run \'webpack init\' again if this was not intended.\n') + ); + process.exitCode = 0; + } + }); } };