Giter Club home page Giter Club logo

typedoc-plugin-mermaid's Introduction

GitHub Action CodeFactor npm version node version npm FOSSA Status License: MIT PRs Welcome All Contributors format: Biome test: Vitest build: Vite

typedoc-plugin-mermaid

A plugin for TypeDoc that generates graphs for mermaid.js diagrams by @mermaid annotation.

Installation

The plugin can then be installed using npm:

NPM

# npm
npm install --save-dev typedoc-plugin-mermaid
# or yarn
yarn add -D typedoc-plugin-mermaid

Add this plugin in your typedoc.json:

{
  "plugin": ["typedoc-plugin-mermaid"]
}

If you use the @mermaid tag in your tsdoc comments, add typedoc-plugin-mermaid/tsdoc.json to the extends of tsdoc.json:

{
  "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
  "extends": [
    "typedoc-plugin-mermaid/tsdoc.json"
  ]
}

Usage

Write tsdoc with @mermaid annotations:

/**
 * Hoge is sample class for example of `typedoc-plugin-mermaid`.
 *
 * @mermaid Make TypeDoc easy to use with mermaid.js
 * graph TB
 *   mermaid.js --> TypeDoc;
 */
export class Hoge { }

Or use fenced code blocks:

/**
 * Mermaid code blocks are automatically detect and converted.
 *
 * ```mermaid
 * graph TB
 *   mermaid.js --> TypeDoc;
 * ```
 */
export class Mermaid { }

↓↓ DEMO ↓↓

Example

Arguments

The following arguments can be used in addition to the default TypeDoc arguments.

$ 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):

Yuki Yamazaki
Yuki Yamazaki

🤔 💻 ⚠️ 📖
Bob Kerns
Bob Kerns

🐛 💻
Emily Marigold Klassen
Emily Marigold Klassen

💻 ⚠️
Mathieu Jalbert-Claveau
Mathieu Jalbert-Claveau

🐛
Michael Schmidt
Michael Schmidt

💻 ⚠️ 📖
Carl Fürstenberg
Carl Fürstenberg

🐛 🚇
Will Henderson
Will Henderson

💻 🐛 💡
guryanovev
guryanovev

🐛
Ricardo Ferreira
Ricardo Ferreira

🤔
Maneet Goyal
Maneet Goyal

🤔
Juergen Zimmermann
Juergen Zimmermann

🐛
Michal Kindl
Michal Kindl

️️️️♿️
Ludovic Muller
Ludovic Muller

️️️️♿️

This project follows the all-contributors specification. Contributions of any kind welcome!

License

This software is released under the MIT License, see LICENSE.

FOSSA Status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.