@doccov/cli 0.3.0 → 0.4.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 +24 -48
- package/dist/cli.js +789 -162
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,67 +1,43 @@
|
|
|
1
1
|
# @doccov/cli
|
|
2
2
|
|
|
3
|
-
Command-line interface for documentation coverage and drift detection
|
|
3
|
+
Command-line interface for documentation coverage and drift detection.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
|
+
|
|
6
7
|
```bash
|
|
7
8
|
npm install -g @doccov/cli
|
|
8
9
|
```
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
11
13
|
```bash
|
|
12
|
-
# Check
|
|
14
|
+
# Check coverage
|
|
13
15
|
doccov check --min-coverage 80
|
|
14
16
|
|
|
15
|
-
# Generate
|
|
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';
|
|
17
|
+
# Generate spec
|
|
18
|
+
doccov generate -o openpkg.json
|
|
41
19
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
exclude: ['internalHelper'],
|
|
45
|
-
});
|
|
20
|
+
# Require examples
|
|
21
|
+
doccov check --require-examples
|
|
46
22
|
```
|
|
47
|
-
CLI flags always win over config values.
|
|
48
23
|
|
|
49
|
-
##
|
|
24
|
+
## Commands
|
|
50
25
|
|
|
51
|
-
|
|
26
|
+
| Command | Description |
|
|
27
|
+
|---------|-------------|
|
|
28
|
+
| `check` | Validate coverage thresholds |
|
|
29
|
+
| `generate` | Generate OpenPkg spec |
|
|
30
|
+
| `diff` | Compare two specs |
|
|
31
|
+
| `report` | Generate coverage report |
|
|
32
|
+
| `scan` | Analyze GitHub repos |
|
|
33
|
+
| `init` | Create config file |
|
|
52
34
|
|
|
53
|
-
|
|
54
|
-
✖ Docs coverage 72% fell below required 80%.
|
|
35
|
+
## Documentation
|
|
55
36
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Suggestion: Did you mean "id"?
|
|
60
|
-
```
|
|
37
|
+
- [CLI Overview](../../docs/cli/overview.md)
|
|
38
|
+
- [Command Reference](../../docs/cli/commands/)
|
|
39
|
+
- [Configuration](../../docs/cli/configuration.md)
|
|
61
40
|
|
|
62
|
-
##
|
|
63
|
-
Full command reference and troubleshooting tips live in the repository:
|
|
64
|
-
- [Usage docs](../../USAGE.md)
|
|
65
|
-
- [Fixtures](../../tests/fixtures/README.md)
|
|
41
|
+
## License
|
|
66
42
|
|
|
67
|
-
MIT
|
|
43
|
+
MIT
|