# xea-cli-node-service

> node ts 项目开发环境，打包

Latest version **1.0.2** (published 2020-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install xea-cli-node-service
pnpm add xea-cli-node-service
yarn add xea-cli-node-service
bun add xea-cli-node-service
```

Provides the command `xea-cli-node-service`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-01-12 |
| First published | 2020-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yejiang1015 |
| Maintainers | yejiang |
| Keywords | node, ts, node工具, webpack, cli |

## Links

- npm: https://www.npmjs.com/package/xea-cli-node-service
- Repository: https://github.com/yejiang1015/xea-cli-node-service
- Homepage: https://github.com/yejiang1015/xea-cli-node-service#readme
- Issues: https://github.com/yejiang1015/xea-cli-node-service/issues
- npm.io page: https://npm.io/package/xea-cli-node-service

## Dependencies (10)

- [colors](https://npm.io/package/colors.md) ^1.4.0
- [webpack](https://npm.io/package/webpack.md) ^4.41.5
- [readline](https://npm.io/package/readline.md) ^1.3.0
- [ts-loader](https://npm.io/package/ts-loader.md) ^6.2.1
- [typescript](https://npm.io/package/typescript.md) ^3.7.4
- [webpack-cli](https://npm.io/package/webpack-cli.md) ^3.3.10
- [clean-webpack-plugin](https://npm.io/package/clean-webpack-plugin.md) ^3.0.0
- [nodemon-webpack-plugin](https://npm.io/package/nodemon-webpack-plugin.md) ^4.2.2
- [webpack-node-externals](https://npm.io/package/webpack-node-externals.md) ^1.7.2
- [progress-bar-webpack-plugin](https://npm.io/package/progress-bar-webpack-plugin.md) ^1.12.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-01-12
- 1.0.1 — 2020-01-11
- 1.0.0 — 2020-01-11

## README

# xea-cli-node-service

# 安装

You can install xea-cli-node-service using npm:

```js
$ npm install xea-cli-node-service --save-dev
```

# 配置

可选择的配置、xea-cli-node-service 具有默认配置。可通过根目录添加配置文件 `xea.config.js` 来自定义覆盖默认配置。
注意：自定义配置都是覆盖字段的值

```js
const path = require("path");
exports.XeaCliNodeService = ({ rootPath, env }) => {
	return {
		/** tsconfig.json 文件目录 */
		tsConfigFile: path.join(rootPath, "tsconfig.json"),
		/** 工作目录 */
		appSrc: path.join(rootPath, "src"),
		/** 入口文件 */
		appIndex: path.join(rootPath, "src/index.ts"),
		/** 打包输出到目录 */
		appBuild: path.join(rootPath, "dist"),
		/** 是否把 node_modules 内的文件一起打包 */
		buildNodeModules: false,
		/** 生产环境是否启用 sourceMap */
		sourceMap: true,
		/** 开发环境是否使用 nodemon 自动启动服务 */
		nodemon: false
	};
};


```

# tsconfig.json

```json

{
    "compileOnSave": false,
    "compilerOptions": {
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "module": "esnext",
        "target": "es5",
        "lib": [
            "es6",
            "dom"
        ],
        "sourceMap": true,
        "allowJs": false,
        "rootDir": ".",
        "baseUrl": ".",
        "moduleResolution": "node",
        "traceResolution": true,
        "forceConsistentCasingInFileNames": true,
        "noImplicitReturns": true,
        "noImplicitThis": true,
        "noImplicitAny": false,
        "strictNullChecks": true,
        "noUnusedLocals": true,
        "allowSyntheticDefaultImports": true,
        "outDir": "dist",
        "skipDefaultLibCheck": true,
        "declaration": true,
        "noUnusedParameters": false,
        "noFallthroughCasesInSwitch": true,
        "removeComments": true,
        "suppressImplicitAnyIndexErrors": true,
        "paths": {
            "~/*": [
                "./*"
            ],
        }
    },
    "awesomeTypescriptLoaderOptions": {
        //Typescript加载选项
        "forkChecker": true,
        "useWebpackText": true
    },
    "exclude": [
        "node_modules",
        "dist",
    ]
}

```

# 使用

-   package.json

```js
"scripts": {
    ...
    "start": "xea-cli-node-service serve",
    "build": "xea-cli-node-service build"
}

```

---
_Source: https://npm.io/package/xea-cli-node-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
