diff --git a/README.md b/README.md index a141f0e..69ead1a 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,24 @@ export class Mermaid { } [![Example](./media/example.png)](https://kamiazya.github.io/typedoc-plugin-samples/classes/hoge.html) +### Arguments + +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` + ## Contributors Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): diff --git a/src/index.ts b/src/index.ts index fdd35ad..2899870 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,5 +2,5 @@ import { Application } from 'typedoc'; import { MermaidPlugin } from './plugin'; export function load(app: Application): void { - new MermaidPlugin().addToApplication(app); + new MermaidPlugin(app).initialize(); } diff --git a/src/plugin.ts b/src/plugin.ts index 4f49a48..ae76815 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,5 +1,5 @@ import * as html from 'html-escaper'; -import { Converter, Context, PageEvent, Application, ReflectionKind, MarkdownEvent } from 'typedoc'; +import { Converter, Context, PageEvent, Application, ReflectionKind, MarkdownEvent, ParameterType } from 'typedoc'; const style = String.raw`
- +