docs: 更新 README.md,添加环境准备和快速开始指南,修改项目配置说明

develop
时启龙 2024-12-17 15:06:19 +08:00
parent 16b4496100
commit eedde19492
1 changed files with 36 additions and 15 deletions

View File

@ -1,24 +1,45 @@
# cmp-screen # 博云 CMP Web 前端项目
## Project setup ## 环境准备
```
yarn install - Node.js 16+
- pnpm ([安装指南](https://pnpm.io/installation))
## 快速开始
1. 配置私有 NPM 源
```bash
# 设置 registry
npm config set registry http://58.210.154.140:13011/repository/bocloud-npm/
npm config set _auth Ym9jbG91ZDpjbXBAdjU4Nw==
# npm 相关配置
npm config set auto-install-peers=true
npm config set strict-peer-dependencies=false
npm config set shamefully-hoist=true
npm config set always-auth true
``` ```
### Compiles and hot-reloads for development 2. 安装依赖
```
yarn serve ```bash
pnpm install
``` ```
### Compiles and minifies for production 3. 本地开发
```
yarn build ```bash
pnpm run serve # 推荐:使用 vue-cli-service
``` ```
### Lints and fixes files 4. 项目构建
```
yarn lint ```bash
pnpm run build
``` ```
### Customize configuration ## 注意事项
See [Configuration Reference](https://cli.vuejs.org/config/).
- 不推荐使用 vite 进行开发,存在兼容性问题
- 建议使用 vue-cli-service serve 进行本地开发