¿Alguna biblioteca para visualizar dependencias de módulos en Node.js?

As part of a major refactoring of my Node.js app (going DDD), I'm looking for a library that through inspecting code is able to visualize module dependencies (by means of 'requiring' them) between different node-modules.

Visualizing in Table-format is fine, I don't need fancy graphs.

Any Node libraries out there?

preguntado el 31 de julio de 12 a las 15:07

Exactly what I was looking for. Sweet! -

4 Respuestas

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

respondido 06 mar '13, 12:03

It should be noted that Colony does not support ES5 import nor ES6 syntax, so using arrow functions for example will totally break the parser. - cdhowie

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

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

Respondido 31 Jul 12, 16:07

Vea también 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.

Respondido el 13 de diciembre de 15 a las 13:12

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


respondido 08 mar '19, 13:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.