Skip to content

Commit 4d1a9de

Browse files
committed
code review
1 parent fbb3009 commit 4d1a9de

File tree

2 files changed

+11
-63
lines changed

2 files changed

+11
-63
lines changed

README.md

Lines changed: 11 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -23,61 +23,18 @@
2323

2424
## Usage
2525

26-
### `help`
27-
28-
```sh
29-
npx api-docs-tooling help [command]
30-
```
31-
32-
### `generate`
33-
34-
Generate API documentation from Markdown files.
35-
36-
```sh
37-
npx api-docs-tooling generate [options]
38-
```
39-
40-
**Options:**
41-
42-
- `-i, --input <patterns...>` Input file patterns (glob)
43-
- `--ignore [patterns...]` Files to ignore
44-
- `-o, --output <dir>` Output directory
45-
- `-v, --version <semver>` Target Node.js version (default: latest)
46-
- `-c, --changelog <url>` Changelog file or URL
47-
- `--git-ref <url>` Git ref/commit URL
48-
- `-t, --target [modes...]` Generator target(s): `json-simple`, `legacy-html`, etc.
49-
- `--no-lint` Skip linting before generation
50-
51-
### `lint`
52-
53-
Run the linter on API documentation.
54-
55-
```sh
56-
npx api-docs-tooling lint [options]
5726
```
27+
Usage: api-docs-tooling [options] [command]
5828
59-
**Options:**
60-
61-
- `-i, --input <patterns...>` Input file patterns (glob)
62-
- `--ignore [patterns...]` Files to ignore
63-
- `--disable-rule [rules...]` Disable specific linting rules
64-
- `--dry-run` Run linter without applying changes
65-
- `-r, --reporter <reporter>` Reporter format: `console`, `github`, etc.
29+
CLI tool to generate and lint Node.js API documentation
6630
67-
### `interactive`
31+
Options:
32+
-h, --help display help for command
6833
69-
Launches a fully interactive CLI prompt to guide you through all available options.
70-
71-
```sh
72-
npx api-docs-tooling interactive
73-
```
74-
75-
### `list`
76-
77-
See available modules for each subsystem.
78-
79-
```sh
80-
npx api-docs-tooling list generators
81-
npx api-docs-tooling list rules
82-
npx api-docs-tooling list reporters
83-
```
34+
Commands:
35+
generate [options] Generate API docs
36+
lint [options] Run linter independently
37+
interactive Launch guided CLI wizard
38+
list <types> List the given type
39+
help [command] display help for command
40+
```

bin/cli.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,5 @@ program
4949
.description('List the given type')
5050
.action(list);
5151

52-
// Register the help command
53-
program
54-
.command('help [cmd]')
55-
.description('Show help for a command')
56-
.action(cmdName => {
57-
const target = program.commands.find(c => c.name() === cmdName) ?? program;
58-
target.help();
59-
});
60-
6152
// Parse and execute command-line arguments
6253
program.parse(process.argv);

0 commit comments

Comments
 (0)