# wind-tsdoc

> ## 该工具共有三个功能，init/add/config

Latest version **1.0.10** (published 2020-06-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install wind-tsdoc
pnpm add wind-tsdoc
yarn add wind-tsdoc
bun add wind-tsdoc
```

Provides the command `tsdoc`.

## 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.10 |
| Published | 2020-06-17 |
| First published | 2020-06-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 31.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mid_autumn |

## Links

- npm: https://www.npmjs.com/package/wind-tsdoc
- Homepage: https://github.com/wind4gis/ts-doc
- npm.io page: https://npm.io/package/wind-tsdoc

## Dependencies (14)

- [ora](https://npm.io/package/ora.md) ^4.0.4
- [chalk](https://npm.io/package/chalk.md) ^4.0.0
- [eslint](https://npm.io/package/eslint.md) ^7.2.0
- [prettier](https://npm.io/package/prettier.md) ^2.0.5
- [ts-morph](https://npm.io/package/ts-morph.md) ^7.1.1
- [commander](https://npm.io/package/commander.md) ^5.1.0
- [puppeteer](https://npm.io/package/puppeteer.md) ^2.1.1
- [eventbusjs](https://npm.io/package/eventbusjs.md) ^0.2.0
- [typescript](https://npm.io/package/typescript.md) ^3.9.5
- [code-block-writer](https://npm.io/package/code-block-writer.md) ^10.1.0
- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) ^11.1.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^3.2.0
- [eslint-config-recommended](https://npm.io/package/eslint-config-recommended.md) ^4.1.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^3.2.0

## Recent versions

- 1.0.10 (latest) — 2020-06-17
- 1.0.9 — 2020-06-16
- 1.0.8 — 2020-06-16
- 1.0.7 — 2020-06-16
- 1.0.6 — 2020-06-16
- 1.0.5 — 2020-06-16
- 1.0.4 — 2020-06-16
- 1.0.3 — 2020-06-16
- 1.0.2 — 2020-06-16
- 1.0.1 — 2020-06-16
- 1.0.0 — 2020-06-16

## README

# 通过puppeteer、ts-morph和commander编写命令行工具，抓取api文档的接口数据，利用事件监听响应机制，动态生成ts文档以及支持智能添加

## 该工具共有三个功能，init/add/config

1. 先通过`tsdoc config xxx.js`命令初始化配置信息（其中xxx.js为实际的配置文件地址），进行初始化。

2. 在对应的文件夹下执行`tsdoc init xxx`命令，初始化请求api对应的index.ts文件和对应类型以及注释的type.ts文件（其中xxx为实际的api接口地址）。如果想覆盖已经生成的index.ts文件和type.ts文件，可以通过添加`-f`参数，强制覆盖：`tsdoc init -f xxx`。

3. 在已经生成文件的目录下，可以通过执行`tsdoc add xxx`命令，在源文件上动态添加新的api文档描述

> 需要先手动执行`tsdoc config`命令进行初始化，不然无法执行后续的命令

## config文件的格式如下

``` javascript
// config.js文件
module.exports = {
	username: "", // 实际的用户名
	password: "", // 实际的用户密码
	fetchfilePath: "@/utils/fetch/index", // 实际的请求文件地址
	responsefilePath: "@/utils/fetch/type", // 实际的请求类型文件地址
};

```

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