Skip to content

Commit e6b06e5

Browse files
authored
docs: align npm commands to other pms (create and add) (#6550)
1 parent 5d97de1 commit e6b06e5

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/guide/features.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ That said, Vite does provide built-in support for `.scss`, `.sass`, `.less`, `.s
191191

192192
```bash
193193
# .scss and .sass
194-
npm install -D sass
194+
npm add -D sass
195195

196196
# .less
197-
npm install -D less
197+
npm add -D less
198198

199199
# .styl and .stylus
200-
npm install -D stylus
200+
npm add -D stylus
201201
```
202202

203203
If using Vue single file components, this also automatically enables `<style lang="sass">` et al.

docs/guide/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Vite requires [Node.js](https://nodejs.org/en/) version >=12.2.0. However, some
4444
With NPM:
4545

4646
```bash
47-
$ npm init vite@latest
47+
$ npm create vite@latest
4848
```
4949

5050
With Yarn:
@@ -65,10 +65,10 @@ You can also directly specify the project name and the template you want to use
6565

6666
```bash
6767
# npm 6.x
68-
npm init vite@latest my-vue-app --template vue
68+
npm create vite@latest my-vue-app --template vue
6969

7070
# npm 7+, extra double-dash is needed:
71-
npm init vite@latest my-vue-app -- --template vue
71+
npm create vite@latest my-vue-app -- --template vue
7272

7373
# yarn
7474
yarn create vite my-vue-app --template vue

docs/guide/using-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Vite can be extended using plugins, which are based on Rollup's well-designed pl
77
To use a plugin, it needs to be added to the `devDependencies` of the project and included in the `plugins` array in the `vite.config.js` config file. For example, to provide support for legacy browsers, the official [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy) can be used:
88

99
```
10-
$ npm i -D @vitejs/plugin-legacy
10+
$ npm add -D @vitejs/plugin-legacy
1111
```
1212

1313
```js

packages/create-vite/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
With NPM:
99

1010
```bash
11-
$ npm init vite@latest
11+
$ npm create vite@latest
1212
```
1313

1414
With Yarn:
@@ -29,10 +29,10 @@ You can also directly specify the project name and the template you want to use
2929

3030
```bash
3131
# npm 6.x
32-
npm init vite@latest my-vue-app --template vue
32+
npm create vite@latest my-vue-app --template vue
3333

3434
# npm 7+, extra double-dash is needed:
35-
npm init vite@latest my-vue-app -- --template vue
35+
npm create vite@latest my-vue-app -- --template vue
3636

3737
# yarn
3838
yarn create vite my-vue-app --template vue

0 commit comments

Comments
 (0)