Any library for visualizing module dependencies in Node.js?

我的梦境 提交于 2019-12-05 10:16:38

I do not know if this exists, but I found the following by quick search:

Maybe subdeps is not exactly what you want right now, but I think you could use these projects to make that project yourself?

If you may accept also some fancy graphs: http://hughsk.github.com/colony/

See also https://github.com/pahen/madge

Create graphs from your CommonJS, AMD or ES6 module dependencies. Could also be useful for finding circular dependencies in your code. Tested on Node.js and RequireJS projects. Dependencies are calculated using static code analysis.

I just published my node-dependency-visualizer, which is a small module, that creates a digraph from your node dependencies. Paired with graphviz/dot you can create a dependency graph as svg (or other image format) which you can include with your documentation, embed in your Readme.md, ...

However, it does not check, whether the dependencies are actually needed in code - not sure, whether the OP meant that with "requiring". Of course this question is old, but this tool might be helpful for others, too.

Sample image (Angluar cli):

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!