diff --git a/docs/guide/index.md b/docs/guide/index.md index f76d0237918472..89aab322752307 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -67,27 +67,81 @@ $ bun create vite ::: + +You can use `.` to scaffold inside an existing directory. + +::: code-group + +```bash [NPM] +$ npm create vite@latest . +``` + +```bash [Yarn] +$ yarn create vite . +``` + +```bash [PNPM] +$ pnpm create vite . +``` + +```bash [Bun] +$ bun create vite . +``` + +::: + + Then follow the prompts! 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: -```bash +::: code-group + +```bash [NPM] # npm 7+, extra double-dash is needed: npm create vite@latest my-vue-app -- --template vue +``` -# yarn +```bash [Yarn] yarn create vite my-vue-app --template vue +``` -# pnpm +```bash [PNPM] pnpm create vite my-vue-app --template vue +``` -# bun +```bash [Bun] bun create vite my-vue-app --template vue ``` -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`. +::: + + +You can use `.` for the project name to scaffold in the current directory. + +::: code-group + +```bash [NPM] +# npm 7+, extra double-dash is needed: +npm create vite@latest . -- --template vue +``` -You can use `.` for the project name to scaffold in the current directory. +```bash [Yarn] +yarn create vite . --template vue +``` + +```bash [PNPM] +pnpm create vite . --template vue +``` + +```bash [Bun] +bun create vite . --template vue +``` + +::: + + +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`. ## Community Templates