You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# 芒果活动管理后台
|
|
|
|
|
|
|
|
## Getting Started
|
|
|
|
|
|
|
|
environment \
|
|
|
|
- node version v14.17.1
|
|
|
|
- yarn version 1.22.10
|
|
|
|
|
|
|
|
Install dependencies,
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ yarn
|
|
|
|
```
|
|
|
|
|
|
|
|
Start the dev server,
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ yarn start
|
|
|
|
```
|
|
|
|
|
|
|
|
Build 部署
|
|
|
|
```bash
|
|
|
|
// 生产环境部署
|
|
|
|
|
|
|
|
$ yarn build:prod
|
|
|
|
// 注意事项git监听到package.json变化要先执行 yarn 命令安装依赖
|
|
|
|
```
|
|
|
|
部署注意事项:
|
|
|
|
- 部署 html 到非根目录 \
|
|
|
|
配置文件中添加配置:
|
|
|
|
```jsvascript
|
|
|
|
export default {
|
|
|
|
base: '/path/to/your/app/root',
|
|
|
|
};
|
|
|
|
```
|
|
|
|
- 静态资源在非根目录或 cdn \
|
|
|
|
在配置文件中添加配置:
|
|
|
|
```javascript
|
|
|
|
export default {
|
|
|
|
publicPath: "http://yourcdn/path/to/static/"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
- 服务端渲染通过配置文件开启,具体参考http://localhost:8000
|
|
|
|
|
|
|
|
代码规范注意事项:
|
|
|
|
```javascript
|
|
|
|
// 使用快速刷新(Fast Refresh)热更新
|
|
|
|
// 推荐写函数命名组件 例如:
|
|
|
|
const Foo = () => {};
|
|
|
|
export default Foo;
|
|
|
|
```
|