Skip to content

Commit 093722e

Browse files
Chocobo1skipjack
authored andcommitted
docs: use full npm install over npm i (#1740)
Most of the guides use the full command, so it's best to stay consistent.
1 parent 4902981 commit 093722e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/content/contribute/writing-a-loader.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ For instance, the `sass-loader` [specifies `node-sass`](https://github.com/webpa
209209
So you've written a loader, followed the guidelines above, and have it set up to run locally. What's next? Let's go through a simple unit testing example to ensure our loader is working the way we expect. We'll be using the [Jest](https://facebook.github.io/jest/) framework to do this. We'll also install `babel-jest` and some presets that will allow us to use the `import` / `export` and `async` / `await`. Let's start by installing and saving these as a `devDependencies`:
210210

211211
``` bash
212-
npm i --save-dev jest babel-jest babel-preset-env
212+
npm install --save-dev jest babel-jest babel-preset-env
213213
```
214214

215215
__.babelrc__
@@ -254,7 +254,7 @@ Hey [name]!
254254
Pay close attention to this next step as we'll be using the [Node.js API](/api/node) and [`memory-fs`](https://github.com/webpack/memory-fs) to execute webpack. This lets us avoid emitting `output` to disk and will give us access to the `stats` data which we can use to grab our transformed module:
255255

256256
``` bash
257-
npm i --save-dev webpack memory-fs
257+
npm install --save-dev webpack memory-fs
258258
```
259259

260260
__test/compiler.js__

src/content/guides/integrations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ So while webpack's core focus is bundling, there are a variety of extensions tha
2727
For those using Grunt, we recommend the [`grunt-webpack`](https://www.npmjs.com/package/grunt-webpack) package. With `grunt-webpack` you can run webpack or [webpack-dev-server](https://github.com/webpack/webpack-dev-server) as a task, get access to stats within [template tags](https://gruntjs.com/api/grunt.template), split development and production configurations and more. Start by installing `grunt-webpack` as well as `webpack` itself if you haven't already:
2828

2929
``` bash
30-
npm i --save-dev grunt-webpack webpack
30+
npm install --save-dev grunt-webpack webpack
3131
```
3232

3333
Then register a configuration and load the task:
@@ -60,7 +60,7 @@ For more information, please visit the [repository](https://github.com/webpack-c
6060
Gulp is also a fairly straightforward integration with the help of the [`webpack-stream`](https://github.com/shama/webpack-stream) package (a.k.a. `gulp-webpack`). In this case, it is unnecessary to install `webpack` separately as it is a direct dependency of `webpack-stream`:
6161

6262
``` bash
63-
npm i --save-dev webpack-stream
63+
npm install --save-dev webpack-stream
6464
```
6565

6666
Just `require('webpack-stream')` instead of `webpack` and optionally pass it an configuration:
@@ -87,7 +87,7 @@ For more information, please visit the [repository](https://github.com/shama/web
8787
The [`mocha-webpack`](https://github.com/zinserjan/mocha-webpack) utility can be used for a clean integration with Mocha. The repository offers more details on the pros and cons but essentially `mocha-webpack` is a simple wrapper that provides almost the same CLI as Mocha itself and provides various webpack functionality like an improved watch mode and improved path resolution. Here is a small example of how you would install it and use it to run a test suite (found within `./test`):
8888

8989
``` bash
90-
npm i --save-dev webpack mocha mocha-webpack
90+
npm install --save-dev webpack mocha mocha-webpack
9191
mocha-webpack 'test/**/*.js'
9292
```
9393

@@ -99,7 +99,7 @@ For more information, please visit the [repository](https://github.com/zinserjan
9999
The [`karma-webpack`](https://github.com/webpack-contrib/karma-webpack) package allows you to use webpack to pre-process files in [Karma](http://karma-runner.github.io/1.0/index.html). It also makes use of [`webpack-dev-middleware`](https://github.com/webpack/webpack-dev-middleware) and allows passing configurations for both. A simple example may look something like this:
100100

101101
``` bash
102-
npm i --save-dev webpack karma karma-webpack
102+
npm install --save-dev webpack karma karma-webpack
103103
```
104104

105105
__karma.conf.js__

src/content/guides/shimming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ Almost everything we've discussed thus far has been in relation to handling lega
264264
There's a lot of ways to load polyfills. For example, to include the [`babel-polyfill`](https://babeljs.io/docs/usage/polyfill/) we might simply:
265265

266266
``` bash
267-
npm i --save babel-polyfill
267+
npm install --save babel-polyfill
268268
```
269269

270270
and `import` it so as to include it in our main bundle:
@@ -292,7 +292,7 @@ Now while this is one approach, __including polyfills in the main bundle is not
292292
Let's move our `import` to a new file and add the [`whatwg-fetch`](https://github.com/github/fetch) polyfill:
293293

294294
``` bash
295-
npm i --save whatwg-fetch
295+
npm install --save whatwg-fetch
296296
```
297297

298298
__src/index.js__

src/content/guides/tree-shaking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ So we've cued up our "dead code" to be dropped by using the `import` and `export
114114
Let's start by installing it:
115115
116116
``` bash
117-
npm i --save-dev uglifyjs-webpack-plugin
117+
npm install --save-dev uglifyjs-webpack-plugin
118118
```
119119
120120
And then adding it into our config:

0 commit comments

Comments
 (0)