Skip to content

Commit 74b0445

Browse files
feat: script for generating individual CLI doc pages (#1184)
1 parent f42a563 commit 74b0445

2 files changed

Lines changed: 583 additions & 105 deletions

File tree

scripts/docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ This script generates reference documentation for **Lingo.dev CLI**.
1111
### Usage
1212

1313
```bash
14-
pnpm --filter docs run generate-cli-docs [output_file_path]
14+
pnpm --filter docs run generate-cli-docs [output_directory]
1515
```
1616

1717
### How it works
1818

1919
1. Loads the CLI program from the `cli` package.
20-
2. Walks through all commands and subcommands.
21-
3. Generates a Markdown file with the complete command reference.
20+
2. Walks through top-level commands and their subcommands.
21+
3. Generates an `.mdx` file for each top-level command with structured reference content.
2222

2323
### Notes
2424

2525
- When running inside a GitHub Action, this script comments on the PR with the Markdown content.
26-
- When running outside of a GitHub action, the script writes the Markdown file to disk.
26+
- When running outside of a GitHub action, the script writes one `.mdx` file per top-level command to the provided directory.
2727

2828
## generate-config-docs
2929

0 commit comments

Comments
 (0)