From 511a82c9c383067486f002eb55de373c569bbcde Mon Sep 17 00:00:00 2001 From: patak <583075+patak-dev@users.noreply.github.com> Date: Tue, 29 Jul 2025 12:02:51 +0200 Subject: [PATCH 1/2] docs: rework scaffolding your first vite project (#20477) --- guide/index.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/guide/index.md b/guide/index.md index 71c510b8..0660dae0 100644 --- a/guide/index.md +++ b/guide/index.md @@ -43,10 +43,6 @@ The supported template presets are: ## Scaffolding Your First Vite Project -::: tip Compatibility Note -Vite requires [Node.js](https://nodejs.org/en/) version 20.19+, 22.12+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it. -::: - ::: code-group ```bash [npm] @@ -73,6 +69,12 @@ $ deno init --npm vite Then follow the prompts! +::: tip Compatibility Note +Vite requires [Node.js](https://nodejs.org/en/) version 20.19+, 22.12+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it. +::: + +:::: details Using create vite with command line options + 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: ::: code-group @@ -104,6 +106,8 @@ See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) You can use `.` for the project name to scaffold in the current directory. +:::: + ## Community Templates create-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for [community maintained templates](https://github.com/vitejs/awesome-vite#templates) that include other tools or target different frameworks. From b333e1a98a49854e5014a4feda726932351e7690 Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Wed, 30 Jul 2025 10:21:49 +0800 Subject: [PATCH 2/2] resolved conflict --- guide/index.md | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/guide/index.md b/guide/index.md index 2c96e782..3176a29b 100644 --- a/guide/index.md +++ b/guide/index.md @@ -43,13 +43,6 @@ Vite 还提供了强大的扩展性,可通过其 [插件 API](./api-plugin) ## 搭建第一个 Vite 项目 {#scaffolding-your-first-vite-project} -<<<<<<< HEAD -::: tip 兼容性注意 -Vite 需要 [Node.js](https://nodejs.org/en/) 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。 -::: - -======= ->>>>>>> 511a82c9c383067486f002eb55de373c569bbcde ::: code-group ```bash [npm] @@ -76,17 +69,13 @@ $ deno init --npm vite 然后按照提示操作即可! -<<<<<<< HEAD -你还可以通过附加的命令行选项直接指定项目名称和你想要使用的模板。例如,要构建一个 Vite + Vue 项目,运行: -======= -::: tip Compatibility Note -Vite requires [Node.js](https://nodejs.org/en/) version 20.19+, 22.12+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it. +::: tip 兼容性注意 +Vite 需要 [Node.js](https://nodejs.org/en/) 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。 ::: -:::: details Using create vite with command line options +:::: details 使用命令行选项创建 vite -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: ->>>>>>> 511a82c9c383067486f002eb55de373c569bbcde +你还可以通过附加的命令行选项直接指定项目名称和你想要使用的模板。例如,要构建一个 Vite + Vue 项目,运行: ::: code-group @@ -117,13 +106,9 @@ $ deno init --npm vite my-vue-app --template vue 你可以使用 `.` 作为项目名称,在当前目录中创建项目脚手架。 -<<<<<<< HEAD -## 社区模板 {#community-templates} -======= :::: -## Community Templates ->>>>>>> 511a82c9c383067486f002eb55de373c569bbcde +## 社区模板 {#community-templates} create-vite 是一个快速生成主流框架基础模板的工具。查看 Awesome Vite 仓库的 [社区维护模板](https://github.com/vitejs/awesome-vite#templates),里面包含各种工具和不同框架的模板。