Tool to draw a graph of module dependencies in a directory as Markdown
npm install -D @syakoo/dmdgThe following will generate a dependency graph for a module in ./src as README.md (here):
npx @syakoo/dmdg draw ./srcYou 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=10Warning 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.
MIT