From e12f2778348d3a2cb59a4a8850cab0a4e103007c Mon Sep 17 00:00:00 2001 From: Shinigami Date: Tue, 6 Jul 2021 20:23:46 +0200 Subject: [PATCH 1/9] chore: improve prettier config (#4154) --- .vitepress/theme/sponsors.css | 2 +- config/index.md | 4 +--- guide/api-hmr.md | 2 +- guide/static-deploy.md | 8 ++++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.vitepress/theme/sponsors.css b/.vitepress/theme/sponsors.css index 9454103c..d069d7bc 100644 --- a/.vitepress/theme/sponsors.css +++ b/.vitepress/theme/sponsors.css @@ -33,4 +33,4 @@ /* special cases */ #sponsor-mux { padding: 5px 0; -} \ No newline at end of file +} diff --git a/config/index.md b/config/index.md index 3108f3df..716fd069 100644 --- a/config/index.md +++ b/config/index.md @@ -518,9 +518,7 @@ createServer() server: { fs: { // Allow serving files from one level up to the project root - allow: [ - '..' - ] + allow: ['..'] } } } diff --git a/guide/api-hmr.md b/guide/api-hmr.md index 4203e310..952d43fa 100644 --- a/guide/api-hmr.md +++ b/guide/api-hmr.md @@ -115,10 +115,10 @@ For now, calling `import.meta.hot.invalidate()` simply reloads the page. Listen to an HMR event. The following HMR events are dispatched by Vite automatically: + - `'vite:beforeUpdate'` when an update is about to be applied (e.g. a module will be replaced) - `'vite:beforeFullReload'` when a full reload is about to occur - `'vite:beforePrune'` when modules that are no longer needed are about to be pruned - `'vite:error'` when an error occurs (e.g. syntax error) Custom HMR events can also be sent from plugins. See [handleHotUpdate](./api-plugin#handlehotupdate) for more details. - diff --git a/guide/static-deploy.md b/guide/static-deploy.md index 13f36790..5bf5668a 100644 --- a/guide/static-deploy.md +++ b/guide/static-deploy.md @@ -273,10 +273,10 @@ You can quickly deploy your Vite app with Microsoft Azure [Static Web Apps](http - An Azure account and a subscription key. You can create a [free Azure account here](https://azure.microsoft.com/free). - Your app code pushed to [GitHub](https://github.com). -- The [SWA Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps) in [Visual Studio Code](https://code.visualstudio.com). +- The [SWA Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps) in [Visual Studio Code](https://code.visualstudio.com). -Install the extension in VS Code and navigate to your app root. Open the Static Web Apps extension, sign in to Azure, and click the '+' sign to create a new Static Web App. You will be prompted to designate which subscription key to use. +Install the extension in VS Code and navigate to your app root. Open the Static Web Apps extension, sign in to Azure, and click the '+' sign to create a new Static Web App. You will be prompted to designate which subscription key to use. -Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually `/`) and built file location `/dist`. The wizard will run and will create a GitHub action in your repo in a `.github` folder. +Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually `/`) and built file location `/dist`. The wizard will run and will create a GitHub action in your repo in a `.github` folder. -The action will work to deploy your app (watch its progress in your repo's Actions tab) and, when successfully completed, you can view your app in the address provided in the extension's progress window by clicking the 'Browse Website' button that appears when the GitHub action has run. +The action will work to deploy your app (watch its progress in your repo's Actions tab) and, when successfully completed, you can view your app in the address provided in the extension's progress window by clicking the 'Browse Website' button that appears when the GitHub action has run. From 1b41e1a7a9babcc2ebad11dca2de231afe721fa1 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 7 Jul 2021 09:04:00 -0400 Subject: [PATCH 2/9] chore: new sponsor --- .vitepress/theme/sponsors.json | 6 ++++++ public/plaid.svg | 1 + 2 files changed, 7 insertions(+) create mode 100644 public/plaid.svg diff --git a/.vitepress/theme/sponsors.json b/.vitepress/theme/sponsors.json index d9e10ff5..fd4a2e94 100644 --- a/.vitepress/theme/sponsors.json +++ b/.vitepress/theme/sponsors.json @@ -16,5 +16,11 @@ "name": "Mux", "href": "https://mux.com", "src": "/mux.svg" + }, + { + "id": "plaid", + "name": "Plaid Inc.", + "href": "https://plaid.co.jp/", + "src": "/plaid.svg" } ] diff --git a/public/plaid.svg b/public/plaid.svg new file mode 100644 index 00000000..78354f00 --- /dev/null +++ b/public/plaid.svg @@ -0,0 +1 @@ +plaid_yoko \ No newline at end of file From 7591841609730cacbcae16b17daf9118f759fa0e Mon Sep 17 00:00:00 2001 From: KnowsCount Date: Thu, 8 Jul 2021 10:46:26 +0800 Subject: [PATCH 3/9] docs(cn): fix conflict --- config/index.md | 4 ---- guide/api-hmr.md | 14 ++------------ guide/static-deploy.md | 12 ------------ 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/config/index.md b/config/index.md index d29895ab..7c8911d9 100644 --- a/config/index.md +++ b/config/index.md @@ -517,11 +517,7 @@ createServer() export default { server: { fs: { -<<<<<<< HEAD // 可以为项目根目录的上一级提供服务 -======= - // Allow serving files from one level up to the project root ->>>>>>> 1b41e1a7a9babcc2ebad11dca2de231afe721fa1 allow: ['..'] } } diff --git a/guide/api-hmr.md b/guide/api-hmr.md index 530ecb63..83bed16a 100644 --- a/guide/api-hmr.md +++ b/guide/api-hmr.md @@ -114,21 +114,11 @@ if (import.meta.hot) { 监听自定义 HMR 事件。 -<<<<<<< HEAD 以下 HMR 事件由 Vite 自动触发: + - `'vite:beforeUpdate'` 当更新即将被应用时(例如,一个模块将被替换) - `'vite:beforeFullReload'` 当完整的重载即将发生时 - `'vite:beforePrune'` 当不再需要的模块即将被剔除时 - `'vite:error'` 当发生错误时(例如,语法错误) -自定义 HMR 事件可以由插件发送。更多细节详见 [handleHotUpdate](./api-plugin#handleHotUpdate)。 -======= -The following HMR events are dispatched by Vite automatically: - -- `'vite:beforeUpdate'` when an update is about to be applied (e.g. a module will be replaced) -- `'vite:beforeFullReload'` when a full reload is about to occur -- `'vite:beforePrune'` when modules that are no longer needed are about to be pruned -- `'vite:error'` when an error occurs (e.g. syntax error) - -Custom HMR events can also be sent from plugins. See [handleHotUpdate](./api-plugin#handlehotupdate) for more details. ->>>>>>> 1b41e1a7a9babcc2ebad11dca2de231afe721fa1 +自定义 HMR 事件可以由插件发送。更多细节详见 [handleHotUpdate](./api-plugin#handleHotUpdate)。 \ No newline at end of file diff --git a/guide/static-deploy.md b/guide/static-deploy.md index e09d9df9..ac7e2841 100644 --- a/guide/static-deploy.md +++ b/guide/static-deploy.md @@ -271,7 +271,6 @@ $ npm run preview 你可以通过微软 Azure 的 [静态网站应用](https://aka.ms/staticwebapps) 服务来快速部署你的 Vite 应用。你只需: -<<<<<<< HEAD - 注册 Azure 账号并获取一个订阅(subscription)的 key。可以在 [此处快速完成注册](https://azure.microsoft.com/free)。 - 将你的应用代码托管到 [GitHub](https://github.com)。 - 在 [VSCode](https://code.visualstudio.com) 中安装 [SWA 扩展](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps)。 @@ -281,14 +280,3 @@ $ npm run preview 按照扩展程序的启动向导,给你的应用程序起个名字,选择框架预设,并指定应用程序的根目录(通常为 `/`)以及构建文件的路径 `/dist`。此向导完成后,会在你的 repo 中的 `.github` 文件夹中创建一个 Github Action。 这个 action 致力于部署你的应用程序(可以在仓库的 Actions 标签中,查看相关进度),成功完成后,你可以点击 Github 中出现的 “浏览站点” 的按钮,查看你的应用程序。 -======= -- An Azure account and a subscription key. You can create a [free Azure account here](https://azure.microsoft.com/free). -- Your app code pushed to [GitHub](https://github.com). -- The [SWA Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps) in [Visual Studio Code](https://code.visualstudio.com). - -Install the extension in VS Code and navigate to your app root. Open the Static Web Apps extension, sign in to Azure, and click the '+' sign to create a new Static Web App. You will be prompted to designate which subscription key to use. - -Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually `/`) and built file location `/dist`. The wizard will run and will create a GitHub action in your repo in a `.github` folder. - -The action will work to deploy your app (watch its progress in your repo's Actions tab) and, when successfully completed, you can view your app in the address provided in the extension's progress window by clicking the 'Browse Website' button that appears when the GitHub action has run. ->>>>>>> 1b41e1a7a9babcc2ebad11dca2de231afe721fa1 From 97fce9bf4f78b6b9fe18078d3fc119b1854e60bc Mon Sep 17 00:00:00 2001 From: ShenQingchuan Date: Thu, 8 Jul 2021 14:31:28 +0800 Subject: [PATCH 4/9] docs: fix all conflicts. --- config/index.md | 4 ---- guide/api-hmr.md | 12 +----------- guide/static-deploy.md | 12 ------------ 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/config/index.md b/config/index.md index 02bf682f..7c8911d9 100644 --- a/config/index.md +++ b/config/index.md @@ -517,11 +517,7 @@ createServer() export default { server: { fs: { -<<<<<<< HEAD // 可以为项目根目录的上一级提供服务 -======= - // Allow serving files from one level up to the project root ->>>>>>> e12f2778348d3a2cb59a4a8850cab0a4e103007c allow: ['..'] } } diff --git a/guide/api-hmr.md b/guide/api-hmr.md index d3ced98a..998e9363 100644 --- a/guide/api-hmr.md +++ b/guide/api-hmr.md @@ -114,21 +114,11 @@ if (import.meta.hot) { 监听自定义 HMR 事件。 -<<<<<<< HEAD 以下 HMR 事件由 Vite 自动触发: + - `'vite:beforeUpdate'` 当更新即将被应用时(例如,一个模块将被替换) - `'vite:beforeFullReload'` 当完整的重载即将发生时 - `'vite:beforePrune'` 当不再需要的模块即将被剔除时 - `'vite:error'` 当发生错误时(例如,语法错误) 自定义 HMR 事件可以由插件发送。更多细节详见 [handleHotUpdate](./api-plugin#handleHotUpdate)。 -======= -The following HMR events are dispatched by Vite automatically: - -- `'vite:beforeUpdate'` when an update is about to be applied (e.g. a module will be replaced) -- `'vite:beforeFullReload'` when a full reload is about to occur -- `'vite:beforePrune'` when modules that are no longer needed are about to be pruned -- `'vite:error'` when an error occurs (e.g. syntax error) - -Custom HMR events can also be sent from plugins. See [handleHotUpdate](./api-plugin#handlehotupdate) for more details. ->>>>>>> e12f2778348d3a2cb59a4a8850cab0a4e103007c diff --git a/guide/static-deploy.md b/guide/static-deploy.md index bcd1355c..ac7e2841 100644 --- a/guide/static-deploy.md +++ b/guide/static-deploy.md @@ -271,7 +271,6 @@ $ npm run preview 你可以通过微软 Azure 的 [静态网站应用](https://aka.ms/staticwebapps) 服务来快速部署你的 Vite 应用。你只需: -<<<<<<< HEAD - 注册 Azure 账号并获取一个订阅(subscription)的 key。可以在 [此处快速完成注册](https://azure.microsoft.com/free)。 - 将你的应用代码托管到 [GitHub](https://github.com)。 - 在 [VSCode](https://code.visualstudio.com) 中安装 [SWA 扩展](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps)。 @@ -281,14 +280,3 @@ $ npm run preview 按照扩展程序的启动向导,给你的应用程序起个名字,选择框架预设,并指定应用程序的根目录(通常为 `/`)以及构建文件的路径 `/dist`。此向导完成后,会在你的 repo 中的 `.github` 文件夹中创建一个 Github Action。 这个 action 致力于部署你的应用程序(可以在仓库的 Actions 标签中,查看相关进度),成功完成后,你可以点击 Github 中出现的 “浏览站点” 的按钮,查看你的应用程序。 -======= -- An Azure account and a subscription key. You can create a [free Azure account here](https://azure.microsoft.com/free). -- Your app code pushed to [GitHub](https://github.com). -- The [SWA Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps) in [Visual Studio Code](https://code.visualstudio.com). - -Install the extension in VS Code and navigate to your app root. Open the Static Web Apps extension, sign in to Azure, and click the '+' sign to create a new Static Web App. You will be prompted to designate which subscription key to use. - -Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually `/`) and built file location `/dist`. The wizard will run and will create a GitHub action in your repo in a `.github` folder. - -The action will work to deploy your app (watch its progress in your repo's Actions tab) and, when successfully completed, you can view your app in the address provided in the extension's progress window by clicking the 'Browse Website' button that appears when the GitHub action has run. ->>>>>>> e12f2778348d3a2cb59a4a8850cab0a4e103007c From 5e544c12bf6ee124ac3b538fce202b3525e59864 Mon Sep 17 00:00:00 2001 From: patak Date: Mon, 12 Jul 2021 09:06:03 +0200 Subject: [PATCH 5/9] chore: move from @vitejs/create-app to create-vite (#4179) --- blog/announcing-vite2.md | 2 +- guide/features.md | 2 +- guide/index.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blog/announcing-vite2.md b/blog/announcing-vite2.md index fc179f2a..b44b3c35 100644 --- a/blog/announcing-vite2.md +++ b/blog/announcing-vite2.md @@ -24,7 +24,7 @@ Since we decided to completely refactor the internals before 1.0 got out of RC, The original idea of Vite started as a [hacky prototype that serves Vue single-file components over native ESM](https://github.com/vuejs/vue-dev-server). Vite 1 was a continuation of that idea with HMR implemented on top. -Vite 2.0 takes what we learned along the way and is redesigned from scratch with a more robust internal architecture. It is now completely framework agnostic, and all framework-specific support is delegated to plugins. There are now [official templates for Vue, React, Preact, Lit Element](https://github.com/vitejs/vite/tree/main/packages/create-app), and ongoing community efforts for Svelte integration. +Vite 2.0 takes what we learned along the way and is redesigned from scratch with a more robust internal architecture. It is now completely framework agnostic, and all framework-specific support is delegated to plugins. There are now [official templates for Vue, React, Preact, Lit Element](https://github.com/vitejs/vite/tree/main/packages/create-vite), and ongoing community efforts for Svelte integration. ### New Plugin Format and API diff --git a/guide/features.md b/guide/features.md index 46c39639..e54439e4 100644 --- a/guide/features.md +++ b/guide/features.md @@ -24,7 +24,7 @@ Vite caches dependency requests via HTTP headers, so if you wish to locally edit Vite provides an [HMR API](./api-hmr) over native ESM. Frameworks with HMR capabilities can leverage the API to provide instant, precise updates without reloading the page or blowing away application state. Vite provides first-party HMR integrations for [Vue Single File Components](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) and [React Fast Refresh](https://github.com/vitejs/vite/tree/main/packages/plugin-react-refresh). There are also official integrations for Preact via [@prefresh/vite](https://github.com/JoviDeCroock/prefresh/tree/main/packages/vite). -Note you don't need to manually set these up - when you [create an app via `@vitejs/create-app`](./), the selected templates would have these pre-configured for you already. +Note you don't need to manually set these up - when you [create an app via `create-vite`](./), the selected templates would have these pre-configured for you already. ## TypeScript diff --git a/guide/index.md b/guide/index.md index df325bb1..58487b0f 100644 --- a/guide/index.md +++ b/guide/index.md @@ -64,11 +64,11 @@ Supported template presets include: - `svelte` - `svelte-ts` -See [@vitejs/create-app](https://github.com/vitejs/vite/tree/main/packages/create-app) for more details on each template. +See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each template. ## Community Templates -@vitejs/create-app 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. You can use a tool like [degit](https://github.com/Rich-Harris/degit) to scaffold your project with one of the 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. You can use a tool like [degit](https://github.com/Rich-Harris/degit) to scaffold your project with one of the templates. ```bash npx degit user/project my-project From 842e1ad2444a8a3e16e70c760da33830dfbe1fe7 Mon Sep 17 00:00:00 2001 From: patak Date: Mon, 12 Jul 2021 10:20:47 +0200 Subject: [PATCH 6/9] chore: update create-vite commands (#4216) --- guide/index.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/guide/index.md b/guide/index.md index 58487b0f..aad1e2ae 100644 --- a/guide/index.md +++ b/guide/index.md @@ -25,13 +25,19 @@ Vite requires [Node.js](https://nodejs.org/en/) version >=12.0.0. With NPM: ```bash -$ npm init @vitejs/app +$ npm init vite@latest ``` With Yarn: ```bash -$ yarn create @vitejs/app +$ yarn create vite +``` + +With PNPM: + +```bash +$ pnpx create-vite ``` Then follow the prompts! @@ -40,13 +46,13 @@ You can also directly specify the project name and the template you want to use ```bash # npm 6.x -npm init @vitejs/app my-vue-app --template vue +npm init vite@latest my-vue-app --template vue # npm 7+, extra double-dash is needed: -npm init @vitejs/app my-vue-app -- --template vue +npm init vite@latest my-vue-app -- --template vue # yarn -yarn create @vitejs/app my-vue-app --template vue +yarn create vite my-vue-app --template vue ``` Supported template presets include: From e94dc39d503c73887b5fdc013a86ccc0fdcd4947 Mon Sep 17 00:00:00 2001 From: KnowsCount Date: Wed, 14 Jul 2021 11:45:13 +0800 Subject: [PATCH 7/9] docs(cn): fix conflicts --- blog/announcing-vite2.md | 6 +----- guide/features.md | 6 +----- guide/index.md | 17 ++--------------- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/blog/announcing-vite2.md b/blog/announcing-vite2.md index 1597453a..1bab382f 100644 --- a/blog/announcing-vite2.md +++ b/blog/announcing-vite2.md @@ -24,11 +24,7 @@ Vite 1.0 虽然之前进入了 RC 阶段,但在发布之前我们决定进行 设计 Vite 的初衷是为了 [探索黑客原型项目以更好的支持 Vue 单文件组件](https://github.com/vuejs/vue-dev-server)。Vite 1 则是这个想法的延续,并在此基础上增加了对 HMR 支持。 -<<<<<<< HEAD -但 2.0 基于之前的经验提供了一个更稳定灵活的内部架构,从而可以完全通过插件机制来支持任意框架。现在 Vite 提供 [官方的 Vue, React, Preact, Lit Element 项目模版](https://github.com/vitejs/vite/tree/main/packages/create-app),而 Svelte 社区也在开发 Vite 整合方案。 -======= -Vite 2.0 takes what we learned along the way and is redesigned from scratch with a more robust internal architecture. It is now completely framework agnostic, and all framework-specific support is delegated to plugins. There are now [official templates for Vue, React, Preact, Lit Element](https://github.com/vitejs/vite/tree/main/packages/create-vite), and ongoing community efforts for Svelte integration. ->>>>>>> 842e1ad2444a8a3e16e70c760da33830dfbe1fe7 +但 2.0 基于之前的经验提供了一个更稳定灵活的内部架构,从而可以完全通过插件机制来支持任意框架。现在 Vite 提供 [官方的 Vue, React, Preact, Lit Element 项目模版](https://github.com/vitejs/vite/tree/main/packages/create-vite),而 Svelte 社区也在开发 Vite 整合方案。 ### 全新插件机制和 API {#new-plugin-format-and-api} diff --git a/guide/features.md b/guide/features.md index ab338fbd..52908ae4 100644 --- a/guide/features.md +++ b/guide/features.md @@ -24,11 +24,7 @@ Vite 通过 HTTP 头来缓存请求得到的依赖,所以如果你想要编辑 Vite 提供了一套原生 ESM 的 [HMR API](./api-hmr)。 具有 HMR 功能的框架可以利用该 API 提供即时、准确的更新,而无需重新加载页面或清除应用程序状态。Vite 内置了 HMR 到 [Vue 单文件组件(SFC)](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) 和 [React Fast Refresh](https://github.com/vitejs/vite/tree/main/packages/plugin-react-refresh) 中。也通过 [@prefresh/vite](https://github.com/JoviDeCroock/prefresh/tree/main/packages/vite) 对 Preact 实现了官方集成。 -<<<<<<< HEAD -注意,你不需要手动设置这些 —— 当你 [create an app via `@vitejs/create-app`](./) 创建应用程序时,所选模板已经为你预先配置了这些。 -======= -Note you don't need to manually set these up - when you [create an app via `create-vite`](./), the selected templates would have these pre-configured for you already. ->>>>>>> 842e1ad2444a8a3e16e70c760da33830dfbe1fe7 +注意,你不需要手动设置这些 —— 当你 [create an app via `create-vite`](./) 创建应用程序时,所选模板已经为你预先配置了这些。 ## TypeScript {#typescript} diff --git a/guide/index.md b/guide/index.md index e710c315..3c45ef9a 100644 --- a/guide/index.md +++ b/guide/index.md @@ -48,13 +48,8 @@ $ pnpx create-vite # npm 6.x npm init vite@latest my-vue-app --template vue -<<<<<<< HEAD # npm 7+, 需要额外的双横线: -npm init @vitejs/app my-vue-app -- --template vue -======= -# npm 7+, extra double-dash is needed: npm init vite@latest my-vue-app -- --template vue ->>>>>>> 842e1ad2444a8a3e16e70c760da33830dfbe1fe7 # yarn yarn create vite my-vue-app --template vue @@ -75,19 +70,11 @@ yarn create vite my-vue-app --template vue - `svelte` - `svelte-ts` -<<<<<<< HEAD -查看 [@vitejs/create-app](https://github.com/vitejs/vite/tree/main/packages/create-app) 获取每个模板的更多细节。 -======= -See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each template. ->>>>>>> 842e1ad2444a8a3e16e70c760da33830dfbe1fe7 +查看 [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) 以获取每个模板的更多细节。 ## 社区模板 {#community-templates} -<<<<<<< HEAD -@vitejs/create-app 是一个快速生成主流框架基础模板的工具。查看 Awesome Vite 仓库的 [社区维护模板](https://github.com/vitejs/awesome-vite#templates),里面包含各种工具和不同框架的模板。你可以用如 [degit](https://github.com/Rich-Harris/degit) 之类的工具,使用社区模版来搭建项目。 -======= -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. You can use a tool like [degit](https://github.com/Rich-Harris/degit) to scaffold your project with one of the templates. ->>>>>>> 842e1ad2444a8a3e16e70c760da33830dfbe1fe7 +create-vite 是一个快速生成主流框架基础模板的工具。查看 Awesome Vite 仓库的 [社区维护模板](https://github.com/vitejs/awesome-vite#templates),里面包含各种工具和不同框架的模板。你可以用如 [degit](https://github.com/Rich-Harris/degit) 之类的工具,使用社区模版来搭建项目。 ```bash npx degit user/project my-project From c7d5c2d66ca0db448211cbf213750f8594ac8d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E9=9D=92=E5=B7=9D?= <46062972+ShenQingchuan@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:36:18 +0800 Subject: [PATCH 8/9] fix: update guide/features.md --- guide/features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/features.md b/guide/features.md index 52908ae4..978b112c 100644 --- a/guide/features.md +++ b/guide/features.md @@ -24,7 +24,7 @@ Vite 通过 HTTP 头来缓存请求得到的依赖,所以如果你想要编辑 Vite 提供了一套原生 ESM 的 [HMR API](./api-hmr)。 具有 HMR 功能的框架可以利用该 API 提供即时、准确的更新,而无需重新加载页面或清除应用程序状态。Vite 内置了 HMR 到 [Vue 单文件组件(SFC)](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) 和 [React Fast Refresh](https://github.com/vitejs/vite/tree/main/packages/plugin-react-refresh) 中。也通过 [@prefresh/vite](https://github.com/JoviDeCroock/prefresh/tree/main/packages/vite) 对 Preact 实现了官方集成。 -注意,你不需要手动设置这些 —— 当你 [create an app via `create-vite`](./) 创建应用程序时,所选模板已经为你预先配置了这些。 +注意,你不需要手动设置这些 —— 当你通过 [`create-vite`](./) 创建应用程序时,所选模板已经为你预先配置了这些。 ## TypeScript {#typescript} From dcda7afc9f49c54ff38ede35424191d100f2fdcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E9=9D=92=E5=B7=9D?= <46062972+ShenQingchuan@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:37:10 +0800 Subject: [PATCH 9/9] fix: update guide/index.md for pnpm --- guide/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/index.md b/guide/index.md index 51803af1..f266bab1 100644 --- a/guide/index.md +++ b/guide/index.md @@ -34,7 +34,7 @@ $ npm init vite@latest $ yarn create vite ``` -With PNPM: +使用 PNPM: ```bash $ pnpx create-vite