Start flat projects faster
How can use:
yarn add -D rsflat
Starting your flat project
- --c
Select the evolve profile for the flat project ,default: flatjs-evolve.config.ts
evolve的配置文件。默认是flatjs-evolve.config.ts
- --m
Select the mock profile for the flat project ,default: flatjs-mock.config.ts
mock的配置文件,默认是flatjs-mock.config.ts
- --n
Whether to enable loading flat mock, If you carry this parameter, mock is not turned on, default: false
是否加载flat mock,默认开启, 不带--n 就是忽略flat mock,如果flatMock配置和evolve配置的端口不一致就用mock的端口,如果一致就在端口号+1,
- --p
Whether to enable the built-in api proxymap,Local mock is turned on when set to true, default: true
是否开启内置 api 代理,开启后会通过请求携带的header中的 rs-host 将对应请求代理到 rs-host的值【需要是服务器地址】,默认开启,--p 就是不开启内置 api 代理
So,You wang to run a flat project width local mock service, you can run
rsflat serve
If run it whitout mock, you can run
rsflat serve --n true
// default:false
If run it whithout buildin api proxy, you can run
rsflat serve --p true
// default:false
Build your flat project
- --c
Select the evolve profile for the flat project ,default: flatjs-evolve.config.ts
evolve的配置文件。默认是flatjs-evolve.config.ts
- --m
Select the mock profile for the flat project ,default: flatjs-mock.config.ts
mock的配置文件,默认是flatjs-mock.config.ts
- --f
Filter for build entiry
构建的过滤条件, 包含哪些入口
- --t
Switch the typescript checker, default: false
是否开启typescript检查,默认关闭