Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 766 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 766 Bytes

Tool to draw a graph of module dependencies in a directory as Markdown

Installation

npm install -D @syakoo/dmdg

Usage

The following will generate a dependency graph for a module in ./src as README.md (here):

npx @syakoo/dmdg draw ./src

You can output the results in a block by writing the README as follows:

<!-- DMDG BEGIN -->
Output here
<!-- DMDG END -->

The default graph depth is 5, but you can set it yourself:

npx @syakoo/dmdg draw ./src --maxDepth=10

Warning Since mermaid is used to draw the graph, if the graph is too large, the drawing will fail. It is recommended that maxDepth be set to an appropriate value.

LICENSE

MIT