Skip to content

Commit

Permalink
NpmInstallPlugin no longer needs a default save option
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed May 28, 2016
1 parent de9dfe8 commit 9b07591
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
**Dependencies:**

- mocha: v2.4.5 → [v2.5.3](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#253--2016-05-25)
- npm-install-webpack-plugin: v3.1.2 → [v4.0.0](https://github.com/ericclemmons/npm-install-webpack-plugin/blob/master/CHANGELOG.md#400-2016-05-23)
- npm-install-webpack-plugin: v3.1.2 → [v4.0.0](https://github.com/ericclemmons/npm-install-webpack-plugin/blob/master/CHANGELOG.md#400-2016-05-23) - saving is on by default and [a new `dev` option controls](https://github.com/ericclemmons/npm-install-webpack-plugin#usage) where installed dependencies get saved to
- webpack: v1.13.0 → [v1.13.1](https://github.com/webpack/webpack/compare/v1.13.0...v1.13.1)
- webpack-merge: v0.12.0 → [v0.13.0](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#0130--2016-05-24)

Expand Down
6 changes: 3 additions & 3 deletions docs/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ Starts a development server which serves an app with hot module reloading.

**Flags:**

* `--auto-install` - automatically install missing npm dependencies, for convenience during initial development/prototyping. By default, installed dependencies will also be saved to your app's package.json.
* `--fallback` - fall back to serving the index page from any path, for developing React apps which use the HTML5 History API
* `--auto-install` - automatically install missing npm dependencies and save them to your app's package.json, for convenience during initial development/prototyping
* `--fallback` - fall back to serving the index page from any path, for developing apps which use the History API
* `--host=localhost` - change the hostname the dev server binds to
* `--info` - print info about Webpack modules after rebuilds
* `--port=3000` - change the port the dev server runs on
Expand Down Expand Up @@ -125,7 +125,7 @@ Builds the project.

A static build will be created in `dist/`, with `app.js` and `app.css` files plus any other resources used.

Separate `vendor.js` and `vendor.css` files will be built for any dependencies used from `node_modules/`.
By default, separate `vendor.js` and `vendor.css` files will be built for any dependencies used from `node_modules/`.

By default, static builds are created in production mode. Code will be minified and have dead code elimination performed on it (for example to remove unreachable, or development-mode only, code).

Expand Down
8 changes: 0 additions & 8 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,6 @@ module.exports = {

Configures [options for `NpmInstallPlugin`](https://github.com/ericclemmons/npm-install-webpack-plugin#usage), which will be used if you pass `--auto-install` flag to `nwb serve`.

The default options used by nwb are:

```js
{
save: true
}
```

###### `plugins.vendorBundle`: `Boolean`

Setting this to `false` disables extraction of anything imported from `node_modules/` into a `vendor` bundle.
Expand Down
4 changes: 1 addition & 3 deletions src/createServerWebpackConfig.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import assert from 'assert'

import createWebpackConfig from './createWebpackConfig'
import debug from './debug'
import getPluginConfig from './getPluginConfig'
import getUserConfig from './getUserConfig'

Expand All @@ -21,8 +20,7 @@ export default function(args, buildConfig) {
let hotMiddlewareOptions = args.reload ? '?reload=true' : ''

if (args['auto-install']) {
debug('configuring auto-install')
plugins.install = {save: true}
plugins.install = {}
}

return createWebpackConfig({
Expand Down

0 comments on commit 9b07591

Please sign in to comment.