xea-cli-node-service
安装
You can install xea-cli-node-service using npm:
$ npm install xea-cli-node-service --save-dev
配置
可选择的配置、xea-cli-node-service 具有默认配置。可通过根目录添加配置文件 xea.config.js
来自定义覆盖默认配置。
注意:自定义配置都是覆盖字段的值
const path = ;exports { return /** tsconfig.json 文件目录 */ tsConfigFile: path /** 工作目录 */ appSrc: path /** 入口文件 */ appIndex: path /** 打包输出到目录 */ appBuild: path /** 是否把 node_modules 内的文件一起打包 */ buildNodeModules: false /** 生产环境是否启用 sourceMap */ sourceMap: true /** 开发环境是否使用 nodemon 自动启动服务 */ nodemon: false ;};
tsconfig.json
使用
- package.json
"scripts": ... "start": "xea-cli-node-service serve" "build": "xea-cli-node-service build"