From f5e5520cbc57a9b269216660e7d2d19f5507dc90 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 17 Jul 2020 10:17:23 +0200 Subject: [PATCH] docgen: added README --- packages/docgen/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/docgen/README.md diff --git a/packages/docgen/README.md b/packages/docgen/README.md new file mode 100644 index 0000000000..be1d7cd521 --- /dev/null +++ b/packages/docgen/README.md @@ -0,0 +1,21 @@ +# DocGen - API Reference Documentation Generator + +The docgen package provides a CLI to generate markdown documentation for all exported ApiRefs in `@backstage/core`. The documentation is generated based on exported `ApiRef` instances and their type parameters. + +The CLI supports generating both TechDocs and GitHub Markdown, where the TechDocs one provides some better linking and syntax highlighting. + +## Usage + +To generate markdown documentation in the top-level `docs/` directory, run the following: + +```bash +yarn docgen +``` + +## TODO + +This package was lifted out from the Spotify internal Backstage project and could use some further work: + +- Use a higher-level TypeScript compiler library, e.g. `ts-morph`. +- Support for generating docs for any package or multiple packages. +- Better handling of self-referencing types in APIs, e.g. ConfigApi.