Skip to content

Commit e871f43

Browse files
authored
docs: PNPM as default package manager (#2027)
1 parent 69a0760 commit e871f43

File tree

6 files changed

+34
-27
lines changed

6 files changed

+34
-27
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ packages
8080
parser/ - parser for Slidev's extended Markdown format
8181
create-app/ - scripts and template for `npm init slidev`
8282
create-theme/ - scripts and template for `npm init slidev-theme`
83-
theme-*/ - official themes
83+
vscode/ - the VSCode extension
8484
```
8585

8686
## Code Style

docs/features/remote-access.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ You can run your presentation with remote access by using the `--remote` flag:
1414

1515
::: code-group
1616

17-
```bash [npm]
18-
npm run dev -- --remote
17+
```bash [pnpm]
18+
pnpm dev --remote
1919
# i.e. slidev --remote
2020
```
2121

22-
```bash [pnpm]
23-
pnpm dev -- --remote
22+
```bash [npm]
23+
npm run dev -- --remote
2424
# i.e. slidev --remote
2525
```
2626

@@ -41,13 +41,13 @@ You can open a [Cloudflare Quick Tunnels](https://developers.cloudflare.com/clou
4141

4242
::: code-group
4343

44-
```bash [npm]
45-
npm run dev -- --remote --tunnel
44+
```bash [pnpm]
45+
pnpm dev -- --remote --tunnel
4646
# i.e. slidev --remote --tunnel
4747
```
4848

49-
```bash [pnpm]
50-
pnpm dev -- --remote --tunnel
49+
```bash [npm]
50+
npm run dev -- --remote --tunnel
5151
# i.e. slidev --remote --tunnel
5252
```
5353

docs/guide/exporting.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ Exporting to PDF, PPTX, or PNG relies on [Playwright](https://playwright.dev) fo
2626

2727
::: code-group
2828

29-
```bash [npm]
30-
$ npm i -D playwright-chromium
31-
```
32-
3329
```bash [pnpm]
3430
$ pnpm add -D playwright-chromium
3531
```
3632

33+
```bash [npm]
34+
$ npm i -D playwright-chromium
35+
```
36+
3737
```bash [yarn]
3838
$ yarn add -D playwright-chromium
3939
```

docs/guide/index.md

+15-8
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,21 @@ Run the following command to create a new Slidev project locally:
4646

4747
::: code-group
4848

49-
```bash [npm]
50-
npm init slidev@latest
51-
```
52-
5349
```bash [pnpm]
50+
# If you haven't installed pnpm
51+
npm i -g pnpm
52+
5453
pnpm create slidev
5554
```
5655

56+
```bash [npm]
57+
# Not recommended -
58+
# NPM will download the packages each time you create a new project,
59+
# which is slow and takes up a lot of space
60+
61+
npm init slidev@latest
62+
```
63+
5764
```bash [yarn]
5865
yarn create slidev
5966
```
@@ -68,14 +75,14 @@ If you prefer to have a single Markdown file as your slides, you can install the
6875

6976
::: code-group
7077

71-
```bash [npm]
72-
npm i -g @slidev/cli
73-
```
74-
7578
```bash [pnpm]
7679
pnpm i -g @slidev/cli
7780
```
7881

82+
```bash [npm]
83+
npm i -g @slidev/cli
84+
```
85+
7986
```bash [yarn]
8087
yarn global add @slidev/cli
8188
```

docs/guide/write-theme.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ To get started, we recommend you use our generator for scaffolding your first th
88

99
::: code-group
1010

11-
```bash [npm]
12-
$ npm init slidev-theme@latest
13-
```
14-
1511
```bash [pnpm]
1612
$ pnpm create slidev-theme
1713
```
1814

15+
```bash [npm]
16+
$ npm init slidev-theme@latest
17+
```
18+
1919
```bash [yarn]
2020
$ yarn create slidev-theme
2121
```

packages/create-app/template/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
To start the slide show:
44

5-
- `npm install`
6-
- `npm run dev`
5+
- `pnpm install`
6+
- `pnpm dev`
77
- visit <http://localhost:3030>
88

99
Edit the [slides.md](./slides.md) to see the changes.

0 commit comments

Comments
 (0)