Skip to content

Consistent npm install --save-dev #1132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion content/api/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions content/guides/code-splitting-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion content/guides/development-vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions content/guides/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions content/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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@<version> --save-dev
npm install --save-dev webpack@<version>
```

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.
Expand All @@ -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.
Expand Down