@doccov/cli 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -0
- package/dist/cli.d.ts +0 -0
- package/dist/cli.js +1551 -0
- package/dist/config/index.d.ts +28 -0
- package/dist/config/index.js +139 -0
- package/package.json +70 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @doccov/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for documentation coverage and drift detection in TypeScript.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
```bash
|
|
7
|
+
npm install -g @doccov/cli
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Common Commands
|
|
11
|
+
```bash
|
|
12
|
+
# Check documentation coverage (fail if below 80%)
|
|
13
|
+
doccov check --min-coverage 80
|
|
14
|
+
|
|
15
|
+
# Generate openpkg.json spec
|
|
16
|
+
doccov generate
|
|
17
|
+
|
|
18
|
+
# Point at a specific entry file
|
|
19
|
+
doccov generate src/index.ts --output openpkg.json
|
|
20
|
+
|
|
21
|
+
# Scaffold a config to pin defaults
|
|
22
|
+
doccov init
|
|
23
|
+
|
|
24
|
+
# Strict mode: require examples and 90% coverage
|
|
25
|
+
doccov check --min-coverage 90 --require-examples
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Flags at a Glance
|
|
29
|
+
- `--min-coverage <percentage>` – fail if coverage drops below threshold
|
|
30
|
+
- `--require-examples` – require `@example` blocks on all exports
|
|
31
|
+
- `--include <id>` / `--exclude <id>` – narrow the surface area
|
|
32
|
+
- `--package <name>` – target a workspace package from the monorepo root
|
|
33
|
+
- `--no-external-types` – skip pulling types from installed deps
|
|
34
|
+
- `--output <file>` – write somewhere other than `openpkg.json`
|
|
35
|
+
|
|
36
|
+
## Config File
|
|
37
|
+
Optional `doccov.config.(ts|js|mjs)` keeps CLI defaults alongside your project:
|
|
38
|
+
```ts
|
|
39
|
+
// doccov.config.ts
|
|
40
|
+
import { defineConfig } from '@doccov/cli/config';
|
|
41
|
+
|
|
42
|
+
export default defineConfig({
|
|
43
|
+
include: ['createUser'],
|
|
44
|
+
exclude: ['internalHelper'],
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
CLI flags always win over config values.
|
|
48
|
+
|
|
49
|
+
## Drift Detection
|
|
50
|
+
|
|
51
|
+
DocCov detects when your TSDoc comments drift from your code:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
✖ Docs coverage 72% fell below required 80%.
|
|
55
|
+
|
|
56
|
+
Missing documentation details:
|
|
57
|
+
• createUser: missing params, examples
|
|
58
|
+
• updateUser: JSDoc documents parameter "userId" which is not present in the signature.
|
|
59
|
+
Suggestion: Did you mean "id"?
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## More
|
|
63
|
+
Full command reference and troubleshooting tips live in the repository:
|
|
64
|
+
- [Usage docs](../../USAGE.md)
|
|
65
|
+
- [Fixtures](../../tests/fixtures/README.md)
|
|
66
|
+
|
|
67
|
+
MIT License
|
package/dist/cli.d.ts
ADDED
|
File without changes
|