From 5152d2fb8e1692e90335d18127bc36934bff2d4d Mon Sep 17 00:00:00 2001 From: gaokefei <260480378@qq.com> Date: Wed, 6 Dec 2023 21:22:25 +0800 Subject: [PATCH] docs: add @vue-macros/cli --- docs/guide/getting-started.md | 48 +++++++++++++++++++++++++++++ docs/zh-CN/guide/getting-started.md | 48 +++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 200a9b4a7..2d2203cf4 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -12,6 +12,54 @@ We assume you are already familiar with the basic usages of Vue before you conti - VSCode with the **latest** [Vue Language Features (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) extension. - ❌ WebStorm is not supported. +## Creating a Vue Macros Project + +### Installation + +::: code-group + +```bash [npm] +npm i -g @vue-macros/cli +``` + +```bash [yarn] +yarn global add @vue-macros/cli +``` + +```bash [pnpm] +pnpm add -g @vue-macros/cli +``` + +::: + +This command will install [@vue-macros/cli](https://github.com/vue-macros/vue-macros-cli), the official Vue Macros scaffolding tool. + +### Initialization + +::: code-group + +```bash [npm] +npm create vite@latest my-vue-macros -- --template vue-ts +cd my-vue-macros +vue-macros init +``` + +```bash [yarn] +yarn create vite my-vue-macros --template vue-ts +cd my-vue-macros +vue-macros init +``` + +```bash [pnpm] +pnpm create vite my-vue-macros --template vue-ts +cd my-vue-macros +vue-macros init +``` + +You will be presented with prompts for several optional experimental features. + +::: + ## Demos - [Vite + Vue 3](https://github.com/vue-macros/vite) diff --git a/docs/zh-CN/guide/getting-started.md b/docs/zh-CN/guide/getting-started.md index 5ab597e58..d7712f232 100644 --- a/docs/zh-CN/guide/getting-started.md +++ b/docs/zh-CN/guide/getting-started.md @@ -12,6 +12,54 @@ Vue Macros 是一个库,用于实现尚未被 Vue 正式实现的提案或想 - VSCode 安装了 [Vue Language Features (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) 扩展 - ❌ 不支持 WebStorm +## 搭建第一个 Vue Macros 项目 + +### 安装 + +::: code-group + +```bash [npm] +npm i -g @vue-macros/cli +``` + +```bash [yarn] +yarn global add @vue-macros/cli +``` + +```bash [pnpm] +pnpm add -g @vue-macros/cli +``` + +::: + +这一指令将会安装 [@vue-macros/cli](https://github.com/vue-macros/vue-macros-cli),它是 Vue Macros 官方的项目脚手架工具。 + +### 初始化 + +::: code-group + +```bash [npm] +npm create vite@latest my-vue-macros -- --template vue-ts +cd my-vue-macros +vue-macros init +``` + +```bash [yarn] +yarn create vite my-vue-macros --template vue-ts +cd my-vue-macros +vue-macros init +``` + +```bash [pnpm] +pnpm create vite my-vue-macros --template vue-ts +cd my-vue-macros +vue-macros init +``` + +你将会看到一些可选的实验性功能提示。 + +::: + ## 示例 - [Vite + Vue 3](https://github.com/vue-macros/vue-macros/tree/main/playground/vue3)