Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdklabs/jsii-docgen
Generates reference documentation for jsii modules
https://github.com/cdklabs/jsii-docgen
Last synced: 3 months ago
JSON representation
Generates reference documentation for jsii modules
- Host: GitHub
- URL: https://github.com/cdklabs/jsii-docgen
- Owner: cdklabs
- License: apache-2.0
- Created: 2020-04-20T08:26:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-14T00:31:21.000Z (7 months ago)
- Last Synced: 2024-04-14T06:59:18.869Z (7 months ago)
- Language: TypeScript
- Size: 12.9 MB
- Stars: 48
- Watchers: 15
- Forks: 11
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# jsii-docgen
Generates markdown reference documentation for jsii modules.
## Usage
You can use this as a command line tool or as a library if you need more control.
```shell
$ jsii-docgen
```Will produce a file called `API.md` with the api reference for this module.
As a library:
```ts
import { Documentation, Language } from 'jsii-docgen';const docs = await Documentation.forProject('.');
const markdown = await docs.toMarkdown({ language: Language.TYPESCRIPT }).render(); // returns a markdown stringconst json = await docs.toJson({ language: Language.TYPESCRIPT }).render(); // returns a JSON object
```Curreently jsii-docgen supports generating documentation in the following languages:
- TypeScript (`typescript`)
- Python (`python`)
- Java (`java`)
- C# (`csharp`)
- Go (`go`)## CLI Options
| Option | Required | Description |
| :--------------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------- |
| `--output`, `-o` | optional | Output filename (defaults to API.md if format is markdown, and API.json if format is JSON).
`jsii-docgen -o ./docs/API.md` |
| `--format`, `-f` | optional | Output format. Can be `markdown` or `json`.
`jsii-docgen -f json` |
| `--language`, `-l` | optional | Language to generate documentation for. Can be `typescript`, `python`, `java`, `csharp` or `go`.
`jsii-docgen -l typescript` |
| `--package`, `-p` | optional | The name@version of an NPM package to document.
`jsii-docgen -p my-package` |
| `--readme`, `-r` | optional | Generate docs for user specified README.md.
`jsii-docgen -r` |
| `--submodule`, `-s` | optional | Generate docs for a specific submodule or "root".
`jsii-docgen -s my-submodule` |
| `--split-by-submodule` | optional | Generate a separate file for each submodule.
`jsii-docgen --split-by-submodule` |## Contributions
All contributions are welcome, just raise an issue or submit a PR. Add a test,
update readme. Do the right thing.## License
[Apache 2.0](./LICENSE)