wz-uniapp/docs/uniapp_cli_create.md

24 lines
550 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# uni-app CLI 创建流程
## 目标
使用 CLI 创建一个支持微信小程序、抖音小程序、H5、App 多端的 uni-app 项目Vue3 + Vite
## 创建步骤
1. 进入目标目录(本项目根目录)。
2. 执行脚手架命令:
```bash
npx degit dcloudio/uni-preset-vue#vite .
```
3. 根据需要安装依赖并启动:
```bash
npm install
npm run dev:h5
```
## 说明
- 该模板基于 Vue3 + Vite支持多端构建。
- 小程序端构建可按需使用对应平台的 `dev:mp-weixin`、`dev:mp-toutiao` 等脚本。