diff --git a/.travis.yml b/.travis.yml index d997448f5df1..06ad990738bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,6 @@ script: - bash ./scripts/deploy.sh sudo: required install: - - npm i yarn -g + - npm install --global yarn - yarn - sudo pip install proselint diff --git a/content/api/node.md b/content/api/node.md index 4c13e868bfe5..84860556f375 100644 --- a/content/api/node.md +++ b/content/api/node.md @@ -16,7 +16,7 @@ The Node.js API is useful in scenarios in which you need to customize the build To start using webpack Node.js API, first install webpack if you haven’t yet: ``` bash -npm install webpack --save-dev +npm install --save-dev webpack ``` Then require the webpack module in your Node.js script: diff --git a/content/guides/code-splitting-css.md b/content/guides/code-splitting-css.md index 812eff16d86f..74388ddad92d 100644 --- a/content/guides/code-splitting-css.md +++ b/content/guides/code-splitting-css.md @@ -26,7 +26,7 @@ import 'bootstrap/dist/css/bootstrap.css'; Install the [`css-loader`](/loaders/css-loader) loader: ``` bash -npm i --save-dev css-loader +npm install --save-dev css-loader ``` Configure it in `webpack.config.js` as follows: @@ -54,7 +54,7 @@ webpack can help with this problem by bundling the CSS separately using the `Ext Install the [`ExtractTextWebpackPlugin`](/plugins/extract-text-webpack-plugin) plugin as follows ``` bash -npm i --save-dev extract-text-webpack-plugin +npm install --save-dev extract-text-webpack-plugin ``` To use this plugin, it needs to be added to the `webpack.config.js` file in three steps. diff --git a/content/guides/development-vagrant.md b/content/guides/development-vagrant.md index 60535c2c25ac..5ab7e2a2ec78 100644 --- a/content/guides/development-vagrant.md +++ b/content/guides/development-vagrant.md @@ -21,7 +21,7 @@ end Next, install webpack and webpack-dev-server in your project; ```bash -npm install webpack webpack-dev-server --save-dev +npm install --save-dev webpack webpack-dev-server ``` Make sure to have a `webpack.config.js` file. If you haven't already, use this as a minimal example to get started: diff --git a/content/guides/development.md b/content/guides/development.md index 05f3a678f199..0d114f159dc2 100644 --- a/content/guides/development.md +++ b/content/guides/development.md @@ -57,7 +57,7 @@ webpack --progress --watch Make a change in one of your files and hit save. You should see that it's recompiling. -Watch mode makes no assumptions about a server, so you will need to provide your own. An easy server to use is [`serve`](https://github.com/zeit/serve). After installing (`npm i --save-dev serve`), you can run it in the directory where the outputted files are: +Watch mode makes no assumptions about a server, so you will need to provide your own. An easy server to use is [`serve`](https://github.com/zeit/serve). After installing (`npm install --save-dev serve`), you can run it in the directory where the outputted files are: ```bash `npm bin`/serve @@ -108,7 +108,7 @@ To prepare, make sure you have a `index.html` file that points to your bundle. A Start with installing `webpack-dev-server` from npm: ```bash -npm install webpack-dev-server --save-dev +npm install --save-dev webpack-dev-server ``` When it's done installing, you should be able to use `webpack-dev-server` like this: @@ -141,7 +141,7 @@ W> This is intended for advanced users. webpack-dev-server is much easier to use Start with installing the dependencies from npm: ```bash -npm install express webpack-dev-middleware --save-dev +npm install --save-dev express webpack-dev-middleware ``` After installing, you can use the middleware like this: diff --git a/content/guides/installation.md b/content/guides/installation.md index 25f83ca105e5..be66b74aca97 100644 --- a/content/guides/installation.md +++ b/content/guides/installation.md @@ -16,9 +16,9 @@ The next section tells you how to install webpack locally in a project. ### Local Installation ``` bash -npm install webpack --save-dev +npm install --save-dev webpack -npm install webpack@ --save-dev +npm install --save-dev webpack@ ``` If you are using npm scripts in your project, npm will try to look for webpack installation in your local modules for which this installation technique is useful. @@ -39,7 +39,7 @@ T> To run the local installation of webpack you can access its bin version as `n W> Note that a global webpack installation is not a recommended practice. This locks you down to a specific version of webpack and might fail in projects that use a different version. ``` bash -npm install webpack -g +npm install --global webpack ``` The `webpack` command is now available globally.