From d0d0598859796d2758b383fa797db20b5a7bf0ab Mon Sep 17 00:00:00 2001 From: Ben Kucera Date: Mon, 26 Mar 2018 20:59:29 -0400 Subject: [PATCH 1/2] Update guides/Installation for webpack-cli --- src/content/guides/installation.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/content/guides/installation.md b/src/content/guides/installation.md index 1c6268738a01..97152a0b0365 100644 --- a/src/content/guides/installation.md +++ b/src/content/guides/installation.md @@ -28,7 +28,12 @@ npm install --save-dev webpack npm install --save-dev webpack@ ``` -Installing locally is what we recommend for most projects. This makes it easier to upgrade projects individually when breaking changes are introduced. Typically webpack is run via one or more [npm scripts](https://docs.npmjs.com/misc/scripts) which will look for a webpack installation in your local `node_modules` directory: +Installing locally is what we recommend for most projects. This makes it easier to upgrade projects individually when breaking changes are introduced. Typically webpack is run via one or more [npm scripts](https://docs.npmjs.com/misc/scripts) which requires the installation of `webpack-cli`: +```bash +npm install --save-dev webpack-cli +``` + +Now you can modify your `package.json` in order to find the package that was installed in your `node_modules/.bin` directory: ```json "scripts": { @@ -44,7 +49,7 @@ T> To run the local installation of webpack you can access its bin version as `n The following NPM installation will make `webpack` available globally: ``` bash -npm install --global webpack +npm install --global webpack webpack-cli ``` W> Note that this is __not a recommended practice__. Installing globally locks you down to a specific version of webpack and could fail in projects that use a different version. From 11a7929883a5a39f23977ba2992d1567b48dea2f Mon Sep 17 00:00:00 2001 From: Ben Kucera Date: Tue, 27 Mar 2018 00:23:28 -0400 Subject: [PATCH 2/2] Update installation.md --- src/content/guides/installation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/guides/installation.md b/src/content/guides/installation.md index 97152a0b0365..eb115c888459 100644 --- a/src/content/guides/installation.md +++ b/src/content/guides/installation.md @@ -29,6 +29,7 @@ npm install --save-dev webpack@ ``` Installing locally is what we recommend for most projects. This makes it easier to upgrade projects individually when breaking changes are introduced. Typically webpack is run via one or more [npm scripts](https://docs.npmjs.com/misc/scripts) which requires the installation of `webpack-cli`: + ```bash npm install --save-dev webpack-cli ```