File tree 3 files changed +21
-3
lines changed
3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
157
157
with :
158
158
fetch-depth : 0 # Not needed if lastUpdated is not enabled
159
159
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
160
+ # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
160
161
- name : Setup Node
161
162
uses : actions/setup-node@v3
162
163
with :
@@ -165,10 +166,10 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
165
166
- name : Setup Pages
166
167
uses : actions/configure-pages@v3
167
168
- name : Install dependencies
168
- run : npm ci # or pnpm install / yarn install
169
+ run : npm ci # or pnpm install / yarn install / bun install
169
170
- name : Build with VitePress
170
171
run : |
171
- npm run docs:build # or pnpm docs:build / yarn docs:build
172
+ npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
172
173
touch docs/.vitepress/dist/.nojekyll
173
174
- name : Upload artifact
174
175
uses : actions/upload-pages-artifact@v2
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ $ pnpm add -D vitepress
29
29
$ yarn add -D vitepress
30
30
```
31
31
32
+ ``` sh [bun]
33
+ $ bun add -D vitepress
34
+ ```
35
+
32
36
:::
33
37
34
38
::: details Getting missing peer deps warnings?
@@ -67,6 +71,10 @@ $ npx vitepress init
67
71
$ pnpm dlx vitepress init
68
72
```
69
73
74
+ ``` sh [bun]
75
+ $ bunx vitepress init
76
+ ```
77
+
70
78
:::
71
79
72
80
You will be greeted with a few simple questions:
@@ -159,6 +167,10 @@ $ pnpm run docs:dev
159
167
$ yarn docs:dev
160
168
```
161
169
170
+ ``` sh [bun]
171
+ $ bun run docs:dev
172
+ ```
173
+
162
174
:::
163
175
164
176
Instead of npm scripts, you can also invoke VitePress directly with:
@@ -173,6 +185,10 @@ $ npx vitepress dev docs
173
185
$ pnpm exec vitepress dev docs
174
186
```
175
187
188
+ ``` sh [bun]
189
+ $ bunx vitepress dev docs
190
+ ```
191
+
176
192
:::
177
193
178
194
More command line usage is documented in the [ CLI Reference] ( ../reference/cli ) .
Original file line number Diff line number Diff line change @@ -211,8 +211,9 @@ export function scaffold({
211
211
`${ getPackageManger ( ) } run docs:dev`
212
212
) } and start writing.${ tip } `
213
213
} else {
214
+ const execCommand = getPackageManger ( ) === 'bun' ? 'bunx' : 'npx'
214
215
return `You're all set! Now run ${ cyan (
215
- `npx vitepress dev${ dir } `
216
+ `${ execCommand } vitepress dev${ dir } `
216
217
) } and start writing.${ tip } `
217
218
}
218
219
}
You can’t perform that action at this time.
0 commit comments