{"id":13795640,"url":"https://github.com/ionic-team/capacitor-docgen","last_synced_at":"2025-04-09T16:05:03.486Z","repository":{"id":40479245,"uuid":"299441025","full_name":"ionic-team/capacitor-docgen","owner":"ionic-team","description":"Docs Readme Markdown and JSON Generator for Capacitor Plugins.","archived":false,"fork":false,"pushed_at":"2025-03-07T15:16:01.000Z","size":588,"stargazers_count":13,"open_issues_count":11,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-09T16:04:56.286Z","etag":null,"topics":["capacitor","capacitor-plugin","docs-generator"],"latest_commit_sha":null,"homepage":"https://capacitorjs.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ionic-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-09-28T21:57:58.000Z","updated_at":"2025-04-04T04:14:36.000Z","dependencies_parsed_at":"2024-01-08T09:03:36.463Z","dependency_job_id":"85d6f016-0f7f-4f04-89b6-3a3ed9e5c2cb","html_url":"https://github.com/ionic-team/capacitor-docgen","commit_stats":{"total_commits":79,"total_committers":6,"mean_commits":"13.166666666666666","dds":"0.44303797468354433","last_synced_commit":"82154f7655004a25b2448247a9958d0cc33d0f8b"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcapacitor-docgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcapacitor-docgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcapacitor-docgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fcapacitor-docgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ionic-team","download_url":"https://codeload.github.com/ionic-team/capacitor-docgen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065289,"owners_count":21041871,"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":["capacitor","capacitor-plugin","docs-generator"],"created_at":"2024-08-03T23:00:59.921Z","updated_at":"2025-04-09T16:05:03.455Z","avatar_url":"https://github.com/ionic-team.png","language":"TypeScript","funding_links":[],"categories":["Tools"],"sub_categories":["Community Plugins","Incompatible"],"readme":"# @capacitor/docgen\n\nDocs Readme Markdown and JSON Generator for [Capacitor](https://capacitorjs.com/) Plugins.\n\n- Designed specifically for generating docs for Capacitor plugins using TypeScript\n- Generates docs data pulled from [JSDocs](https://en.wikipedia.org/wiki/JSDoc) within source code \n- Replaces placeholders within existing README.md markdown files with the generated docs\n- Outputs a json file of the raw docs data\n- Ideal for formatted docs within Github and NPM readme landing pages\n- If you're looking for an entire docs site generator we recommend [TypeDoc](https://typedoc.org/) instead\n\n```bash\nnpm i @capacitor/docgen --save-dev\n```\n\n## Example Readme File\n\n```\n# My Capacitor Plugin 🔌\n\nThe readme file can be formatted however you'd like. Just insert\nthe docgen placeholder elements where the index of the API methods,\nand the API docs should go.\n\nBelow is an index of all the methods available.\n\n\u003cdocgen-index\u003e\u003c/docgen-index\u003e\n\n## Custom Readme Content\n\nManage your readme content however, and on every `docgen` rebuild\nit will leave the original content as is, but update the inner text \nof the docgen placeholder elements with the updated generated docs.\n\n\u003cdocgen-api\u003e\u003c/docgen-api\u003e\n\n## Commit Your Readme 🚀\n\nThe benefit of this readme file is that is also acts as the landing \npage for the Github repo and NPM package, and the anchors within the \ndocs can also be linked to and shared.\n```\n\n- [Example Readme Output](https://github.com/ionic-team/capacitor-docgen/blob/main/src/test/README.md)\n- [Example JSON Output](https://github.com/ionic-team/capacitor-docgen/blob/main/src/test/docs.json)\n\n\n## CLI\n\nThe easiest way to run `docgen` is to install `@capacitor/docgen` as a dev dependency\nand add the command to the `package.json` scripts. In the example below, \n`HapticsPlugin` is the primary interface:\n\n```bash\ndocgen --api HapticsPlugin --output-readme README.md\n```\n\n| Flag              | Alias | Description                                                                              |\n|-------------------|-------|------------------------------------------------------------------------------------------|\n| `--api`           | `-a`  | The name of the primary application programming interface. **Required**                  |\n| `--output-readme` | `-r`  | Path to the markdown file to update. Note that the file must already exist. **Required** |\n| `--output-json`   | `-j`  | Path to write the raw docs data as a json file.                                          |\n| `--project`       | `-p`  | Path to the project's `tsconfig.json` file, same as the [project](https://www.typescriptlang.org/docs/handbook/compiler-options.html) flag for TypeScript's CLI. By default it'll attempt to find this file. |\n\n\n#### package.json script\n\n```json\n{\n  \"scripts\": {\n    \"docgen\": \"docgen --api HapticsPlugin --output-readme README.md\"\n  }\n}\n```\n\n## API\n\nThe same API that's available to the CLI can also be imported from `@capacitor/docgen`.\n\n\n## Related\n\n- [Capacitor](https://capacitorjs.com/)\n- [Capacitor Community Plugins](https://github.com/capacitor-community)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionic-team%2Fcapacitor-docgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fionic-team%2Fcapacitor-docgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionic-team%2Fcapacitor-docgen/lists"}