Skip to content

Commit

Permalink
add disableNpmInstall option, Close #11
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Mar 18, 2016
1 parent 9ef5749 commit 0619325
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $ dora --plugins webpack?{"watchOptions":{"poll":true}}
- `publicPath` -- default '/', http://webpack.github.io/docs/configuration.html#output-publicpath
- `config` -- default 'webpack.config.js'
- `verbose` -- more logs
- `disableNpmInstall` -- disable NpmInstallPlugin

And other webpack options, like `watchOptions`, `headers`, `stats`, ...

Expand Down
8 changes: 5 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export default {
console.log(chalk.green('\nwebpack: bundle build is now finished.'));
}
}),
new NpmInstallPlugin({
save: true,
}),
]);
if (!query.disableNpmInstall) {
webpackConfig.plugins.push(new NpmInstallPlugin({
save: true,
}));
}
webpackConfig = applyPlugins('atool-build.updateWebpackConfig', webpackConfig);
webpackConfig = mergeCustomConfig(webpackConfig, customConfigPath, 'development');
},
Expand Down

0 comments on commit 0619325

Please sign in to comment.