# gcli-react

项目打包编译工具

## PreRequire

Node 8+

## Feature

1. 支持两种打包模式，`normal`和`component`，`normal`即打包普通react网页，使用的是`webpack`，`component`用于打包组件库，使用gulp

## Usage

1. Insall

```
gnpm install gcli-react --save-dev
```

2. Use

```bash 
// version
gcli-react version 

// 本地服务器
// 仅在normal模式下可用
gcli-react start

// 打包
gcli-react build

// 运行单元测试
gcli-react test
```

3. Variable（仅在normal模式下可用）

名称 | 说明 | 默认值
---|---|---|
APP_NAME | 应用名称 | package.json中的name值 
APP_VERSION | 应用版本 | package.json中的verson值
APP_UPDATE_TIME | 打包时间 | 
PUBLIC_URL | 资源公共路径 | 默认 ""
CUS_APP_ | 自定义变量前缀 | -

## Todo

- [ ] prettier
- [ ] 集成node打包工具 
- [ ] 在component模式下，监听文件变化自动compile



