Skip to content

Commit d81de48

Browse files
authored
docs: improve additional command line options by code-group (vitejs#17745)
1 parent b58b423 commit d81de48

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

docs/guide/index.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,27 @@ Then follow the prompts!
7171

7272
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue project, run:
7373

74-
```bash
74+
::: code-group
75+
76+
```bash [NPM]
7577
# npm 7+, extra double-dash is needed:
76-
npm create vite@latest my-vue-app -- --template vue
78+
$ npm create vite@latest my-vue-app -- --template vue
79+
```
7780

78-
# yarn
79-
yarn create vite my-vue-app --template vue
81+
```bash [Yarn]
82+
$ yarn create vite my-vue-app --template vue
83+
```
8084

81-
# pnpm
82-
pnpm create vite my-vue-app --template vue
85+
```bash [PNPM]
86+
$ pnpm create vite my-vue-app --template vue
87+
```
8388

84-
# bun
85-
bun create vite my-vue-app --template vue
89+
```bash [Bun]
90+
$ bun create vite my-vue-app --template vue
8691
```
8792

93+
:::
94+
8895
See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each supported template: `vanilla`, `vanilla-ts`, `vue`, `vue-ts`, `react`, `react-ts`, `react-swc`, `react-swc-ts`, `preact`, `preact-ts`, `lit`, `lit-ts`, `svelte`, `svelte-ts`, `solid`, `solid-ts`, `qwik`, `qwik-ts`.
8996

9097
You can use `.` for the project name to scaffold in the current directory.

0 commit comments

Comments
 (0)