A plugin for TypeDoc that generates graphs for mermaid.js diagrams by using @mermaid annotation.
npm install typedoc-plugin-mermaid


!node version
!npm







A plugin for TypeDoc that generates graphs for mermaid.js diagrams by @mermaid annotation.
The plugin can then be installed using npm:

``sh`npm
npm install --save-dev typedoc-plugin-mermaidor yarn
yarn add -D typedoc-plugin-mermaid
Add this plugin in your typedoc.json:
`json`
{
"plugin": ["typedoc-plugin-mermaid"]
}
If you use the @mermaid tag in your tsdoc comments,typedoc-plugin-mermaid/tsdoc.json
add to the extends of tsdoc.json:
`json`
{
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"extends": [
"typedoc-plugin-mermaid/tsdoc.json"
]
}
Write tsdoc with @mermaid annotations:
`typescripttypedoc-plugin-mermaid
/**
* Hoge is sample class for example of .`
*
* @mermaid Make TypeDoc easy to use with mermaid.js
* graph TB
* mermaid.js --> TypeDoc;
*/
export class Hoge { }
Or use fenced code blocks:
`typescript`
/**
* Mermaid code blocks are automatically detect and converted.
*
* mermaid`
* graph TB
* mermaid.js --> TypeDoc;
* `
*/
export class Mermaid { }

The following arguments can be used in addition to the default TypeDoc arguments.
`bash`
$ typedoc --help
...
Options:
--mermaidVersion [Mermaid Plugin] The version of mermaid.js to use.
...
- --mermaidVersion
Specify mermaid.js version to use.
Default: latest, Example: 8.14.0`
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors
specification. Contributions of any kind welcome!
This software is released under the MIT License, see LICENSE.
