# @comate/plugin-cli

> ## 安装

Latest version **0.9.2** (published 2024-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @comate/plugin-cli
pnpm add @comate/plugin-cli
yarn add @comate/plugin-cli
bun add @comate/plugin-cli
```

Provides the command `cpd`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.2 |
| Published | 2024-03-11 |
| First published | 2024-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20.10.0 |
| Dependencies | 15 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | otakustay |

## Links

- npm: https://www.npmjs.com/package/@comate/plugin-cli
- npm.io page: https://npm.io/package/@comate/plugin-cli

## Dependencies (15)

- [clear](https://npm.io/package/clear.md) ^0.1.0
- [rollup](https://npm.io/package/rollup.md) ^4.9.5
- [express](https://npm.io/package/express.md) ^4.18.2
- [p-queue](https://npm.io/package/p-queue.md) ^8.0.1
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.3
- [kolorist](https://npm.io/package/kolorist.md) ^1.8.0
- [clipanion](https://npm.io/package/clipanion.md) ^3.2.1
- [@rollup/plugin-swc](https://npm.io/package/@rollup/plugin-swc.md) ^0.3.0
- [@rollup/plugin-json](https://npm.io/package/@rollup/plugin-json.md) ^6.1.0
- [@comate/plugin-engine](https://npm.io/package/@comate/plugin-engine.md) ^0.9.2
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) ^25.0.7
- [@rollup/plugin-esm-shim](https://npm.io/package/@rollup/plugin-esm-shim.md) ^0.1.5
- [@comate/plugin-playground](https://npm.io/package/@comate/plugin-playground.md) ^0.9.2
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) ^15.2.3
- [@comate/plugin-shared-internals](https://npm.io/package/@comate/plugin-shared-internals.md) ^0.9.2

## Recent versions

- 0.9.2 (latest) — 2024-03-11
- 0.9.1 — 2024-03-11
- 0.9.0 — 2024-03-11

## README

# Comate+插件开发命令行工具

## 安装

```shell
npm install @comate/plugin-cli
```

安装后，可以使用`cpd`命令。

## 构建

```shell
cpd build
```

构建要求：

1. 以`src/index.ts`为主入口。
2. 项目为TypeScript项目，且为纯ESM项目，即满足以下要求：
   1. `tsconfig.json`中的`module`与`moduleResolution`均为`NodeNext`。
   2. `package.json`有`"type": "module"`字段。

构建使用Rollup进行，会将文件找包为`dist/index.js`。

## 调试

```shell
cpd dev
```

调试服务器会自动构建插件并输出到`dist`目录下，你可以打开`http://localhost:8080`看到调试界面，按照界面说明操作即可。

当你修改`src`下的代码或`package.json`时，调试服务器会自动重新构建并重启服务器，但浏览器页面需要手动刷新（如果没有配置结构的变化，通常不刷新直接发送新的会话也会生效）。

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