diff --git a/docs/guide/deploy.md b/docs/guide/deploy.md index c01d9ab6..baf52b35 100644 --- a/docs/guide/deploy.md +++ b/docs/guide/deploy.md @@ -157,6 +157,7 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f with: fetch-depth: 0 # Not needed if lastUpdated is not enabled # - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm + # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun - name: Setup Node uses: actions/setup-node@v3 with: @@ -165,10 +166,10 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f - name: Setup Pages uses: actions/configure-pages@v3 - name: Install dependencies - run: npm ci # or pnpm install / yarn install + run: npm ci # or pnpm install / yarn install / bun install - name: Build with VitePress run: | - npm run docs:build # or pnpm docs:build / yarn docs:build + npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build touch docs/.vitepress/dist/.nojekyll - name: Upload artifact uses: actions/upload-pages-artifact@v2 diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 9e05b673..b557c7ff 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -29,6 +29,10 @@ $ pnpm add -D vitepress $ yarn add -D vitepress ``` +```sh [bun] +$ bun add -D vitepress +``` + ::: ::: details Getting missing peer deps warnings? @@ -67,6 +71,10 @@ $ npx vitepress init $ pnpm dlx vitepress init ``` +```sh [bun] +$ bunx vitepress init +``` + ::: You will be greeted with a few simple questions: @@ -159,6 +167,10 @@ $ pnpm run docs:dev $ yarn docs:dev ``` +```sh [bun] +$ bun run docs:dev +``` + ::: Instead of npm scripts, you can also invoke VitePress directly with: @@ -173,6 +185,10 @@ $ npx vitepress dev docs $ pnpm exec vitepress dev docs ``` +```sh [bun] +$ bunx vitepress dev docs +``` + ::: More command line usage is documented in the [CLI Reference](../reference/cli). diff --git a/src/node/init/init.ts b/src/node/init/init.ts index 6273a37a..610ed5f0 100644 --- a/src/node/init/init.ts +++ b/src/node/init/init.ts @@ -211,8 +211,9 @@ export function scaffold({ `${getPackageManger()} run docs:dev` )} and start writing.${tip}` } else { + const execCommand = getPackageManger() === 'bun' ? 'bunx' : 'npx' return `You're all set! Now run ${cyan( - `npx vitepress dev${dir}` + `${execCommand} vitepress dev${dir}` )} and start writing.${tip}` } }