From 9b4dc24a513230536ac9e0810451cf2b6012ea29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Mon, 14 Aug 2023 12:22:25 +0200 Subject: [PATCH] docs: include outline and code-group (#14082) --- .vitepress/config.ts | 4 ++++ guide/assets.md | 4 ++++ guide/cli.md | 4 ++++ guide/dep-pre-bundling.md | 4 ++++ guide/index.md | 14 ++++++-------- guide/why.md | 4 ++++ 6 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 7646fb17..5f33edb8 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -164,6 +164,10 @@ export default defineConfig({ text: 'Changelog', link: 'https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md', }, + { + text: 'Contributing', + link: 'https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md', + }, ], }, ], diff --git a/guide/assets.md b/guide/assets.md index dff926f2..782d734e 100644 --- a/guide/assets.md +++ b/guide/assets.md @@ -1,3 +1,7 @@ +--- +outline: [2, 3] +--- + # Static Asset Handling - Related: [Public Base Path](./build#public-base-path) diff --git a/guide/cli.md b/guide/cli.md index 497ad661..84efa501 100644 --- a/guide/cli.md +++ b/guide/cli.md @@ -1,3 +1,7 @@ +--- +outline: [2, 3] +--- + # Command Line Interface ## Dev server diff --git a/guide/dep-pre-bundling.md b/guide/dep-pre-bundling.md index ddfad451..1a8f0f22 100644 --- a/guide/dep-pre-bundling.md +++ b/guide/dep-pre-bundling.md @@ -1,3 +1,7 @@ +--- +outline: [2, 3] +--- + # Dependency Pre-Bundling When you run `vite` for the first time, Vite prebundles your project dependencies before loading your site locally. It is done automatically and transparently by default. diff --git a/guide/index.md b/guide/index.md index ebe76458..b09dedf3 100644 --- a/guide/index.md +++ b/guide/index.md @@ -45,24 +45,22 @@ The supported template presets are: Vite requires [Node.js](https://nodejs.org/en/) version 14.18+, 16+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it. ::: -With NPM: +::: code-group -```bash +```bash [NPM] $ npm create vite@latest ``` -With Yarn: - -```bash +```bash [Yarn] $ yarn create vite ``` -With PNPM: - -```bash +```bash [PNPM] $ pnpm 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: diff --git a/guide/why.md b/guide/why.md index d58d165c..1647c778 100644 --- a/guide/why.md +++ b/guide/why.md @@ -1,3 +1,7 @@ +--- +outline: [2, 3] +--- + # Why Vite ## The Problems