{"id":17696523,"url":"https://github.com/kazupon/api-docs-gen","last_synced_at":"2025-03-17T16:11:06.549Z","repository":{"id":39660505,"uuid":"276435324","full_name":"kazupon/api-docs-gen","owner":"kazupon","description":":book: API Documentation generator from `api-extractor` doc model","archived":false,"fork":false,"pushed_at":"2025-01-13T17:48:58.000Z","size":1414,"stargazers_count":29,"open_issues_count":19,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T00:06:57.112Z","etag":null,"topics":["api-extractor","documentation","generator","tsdoc","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kazupon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"kazupon","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"issuehunt":null,"custom":null}},"created_at":"2020-07-01T16:59:11.000Z","updated_at":"2025-01-05T12:48:52.000Z","dependencies_parsed_at":"2024-06-19T05:17:50.516Z","dependency_job_id":"5c2c0613-f7cd-4622-bbb2-e60a851f6851","html_url":"https://github.com/kazupon/api-docs-gen","commit_stats":{"total_commits":114,"total_committers":4,"mean_commits":28.5,"dds":"0.49122807017543857","last_synced_commit":"507742519b52d44393966bae66dcfd641b735b73"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazupon%2Fapi-docs-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazupon%2Fapi-docs-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazupon%2Fapi-docs-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazupon%2Fapi-docs-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazupon","download_url":"https://codeload.github.com/kazupon/api-docs-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066180,"owners_count":20392406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-extractor","documentation","generator","tsdoc","typescript"],"created_at":"2024-10-24T14:44:36.220Z","updated_at":"2025-03-17T16:11:06.510Z","avatar_url":"https://github.com/kazupon.png","language":"TypeScript","readme":"# 📔 api-docs-gen\n\n![Test](https://github.com/kazupon/api-docs-gen/workflows/Test/badge.svg)\n[![npm](https://img.shields.io/npm/v/api-docs-gen.svg)](https://www.npmjs.com/package/api-docs-gen)\n\nAPI Documentation generator from `api-extractor` doc model\n\n\n## 🔨 Requirement\n\nYou need to generate **doc model** with using [`api-extractor`](https://api-extractor.com/)\n\n\n## 💿 Installation\n\n### npm\n\n```sh\n$ npm install -g api-docs-gen\n```\n\n### yarn\n```sh\nyarn global api-docs-gen\n```\n\n### pnpm\n```sh\npnpm add -g api-docs-gen\n```\n\n\n## 🚀 Usage\n\n### CLI\n```\nUsage\n  $ api-docs-gen \u003cpackage1.api.json\u003e \u003cpackage2.api.json\u003e ...\n\nOptions\n  --config, -c              configration file\n  --output, -o              output dierectory that is markdown contents\n  --generateStyle, -g       document generating style, default 'prefix'\n                            'prefix': be able to separated with each package name\n                            'directory': be able to separated with each package directory\n  --tsdocConfig, -t         tsdoc configration file\n```\n\n\n### 🤝 API\n```javascript\nconst path = require('path')\nconst { genereate, DefaultConfig } = require('api-docs-gen')\n\n// input\nconst input = [path.resolve(process.cwd(), './package1.api.json')]\n\n// output\nconst output = path.resolve(process.cwd(), './docs')\n\n// generate API docs with prefixed package name\nawait generate(input, output, { style: 'prefix', config: DefaultConfig })\n```\n\nAbout details, See the [API References](https://github.com/kazupon/api-docs-gen/blob/master/api-docs-gen-api.md)\n\n\n## 🍭 Examples\nYou can play API docs generation that have [multi packages](https://github.com/kazupon/api-docs-gen/tree/master/examples/packages).\n\nYou can play with the following command:\n\n```sh\n$ pnpm example:build # build on each package\n\n$ pnpm example:extract # generate doc model with `api-extractor` on each package\n\n$ pnpm example:gen # genearte API docs with `api-docs-gen`\n\n$ pnpm example:docs # run vuepress\n```\n\n## 🔖 TSDoc custom tags\n\n`api-docs-gen` allows TSDoc custom tags to be processed using [tsdoc-config](https://github.com/microsoft/tsdoc/tree/master/tsdoc-config).\n\nYou can make it work from the `api-extractor` model by specifying tsdoc configration in the `--tsdoc-config` option as follows:\n\n```bash\n$ api-docs-gen package1.api.json --tsdoc-config ./tsdoc.json\n```\n\nIf you want to output custom tags comment to markdown, you need to implement and configure the custom `MarkdownProcessor`.\n\nFor the `MarkdownProcessor`, see the [API References](https://github.com/kazupon/api-docs-gen/blob/master/api-docs-gen-api.md).\n\nSee how to configure it in the following configration.\n\n## 🔧 Configration\nYou can fully customize the generation of api docs using the config offered by `api-docs-gen`.\n\nHere is the schema (typescript type definition) of the config:\n```typescript\n// There are two things you need to specify in config\nexport interface Config {\n  // A resolver that resolves references to links in markdown content\n  linkReferencer?: ReferenceResolver\n  // A processor that generates markdown content\n  processor: MarkdownProcessor\n}\n```\n\nYou can generate customized api docs by specifying these as you define them in your config,  and the CLI `--config` option. `api-docs-gen` CLI  will read `docsgen.config.js` as default.\n\napi-docs-gen API docs is a TOC included markdown document. To generate the API docs, it use a customized resolver and processor for TOC.\n\n- Configration: https://github.com/kazupon/api-docs-gen/blob/master/docsgen.config.js\n- TOC reolsver: https://github.com/kazupon/api-docs-gen/blob/master/src/resolver/toc.ts\n- TOC processor: https://github.com/kazupon/api-docs-gen/blob/master/src/processor/toc.ts\n\nIf you want to customize your api docs, these will be helpful.\n\nIt's recommended to refer to the [API References](https://github.com/kazupon/api-docs-gen/blob/master/api-docs-gen-api.md) for customization.\n\n\n## 📜 Changelog\nDetails changes for each release are documented in the [CHANGELOG.md](https://github.com/kazupon/api-docs-gen/blob/master/CHANGELOG.md).\n\n\n## ❗ Issues\nPlease make sure to read the [Issue Reporting Checklist](https://github.com/kazupon/api-docs-gen/blob/master/.github/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.\n\n## ✅ TODO\nManaged with [GitHub Projects](https://github.com/kazupon/api-docs-gen/projects/2)\n\n## ©️ License\n\n[MIT](http://opensource.org/licenses/MIT)\n","funding_links":["https://github.com/sponsors/kazupon"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazupon%2Fapi-docs-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazupon%2Fapi-docs-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazupon%2Fapi-docs-gen/lists"}