Skip to content

maeda-m/js2mermaid

Repository files navigation

js2mermaid

Version License: MIT

js2mermaid は JavaScript におけるクラス本体とメソッド定義の呼び出しを Mermaid.js によって可視化し、複雑(Complicated)な場合の認知負荷を軽減したいソフトウェアエンジニア向けの開発者ツールです。

Install

npm install --save-dev js2mermaid

Usage

npx js2mermaid [options] file.js [file|dir]

Options

Option Default Description
--format call-graph Yes コールグラフを出力します
--format class-diagram クラス図を出力します
--debug デバッグ情報を出力します

Features

es2015 以降クラス宣言名前つきクラス式 のクラス本体とメソッド定義を解析し、オプションに応じて次のダイアグラムを出力します。なお出力内容は https://mermaid.live/ などで確認してください。

Call Graph

e.g. 本リポジトリを出力した例

npx js2mermaid --format call-graph bin/js2mermaid.js lib/

call-graph

Class Diagram

e.g. 本リポジトリを出力した例

npx js2mermaid --format class-diagram bin/js2mermaid.js lib/

class-diagram

Run tests

npm run test

Author

@maeda-m

License

Copyright © 2022 maeda-m.

This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

About

Outputs JavaScript class and method definition diagrams and Call Graphs for Mermaid.js.

Topics

Resources

License

Stars

Watchers

Forks