auchenberg / dependo

Visualize your CommonJS or AMD module dependencies in a force directed graph report.
MIT License
484 stars 50 forks source link

Madge dependencies again #37

Closed pojono closed 6 years ago

pojono commented 6 years ago

Hi! I have the same issue https://github.com/auchenberg/dependo/issues/15 Can you update madge dependencies again? On my computer madge@0.5.0 not display dependency tree, and dependo not display connecctions between modules. Latest release of Madge (3.0.0) working correctly.

amiram commented 6 years ago

The upgrade to 3.0.0 is not only changing dependency

pojono commented 6 years ago

Amiram, on your computer is everything ok? With dependo@0.2.0

amiram commented 6 years ago

Yes. if it is not working for you please write what is the bug exactly and how to reproduce it.

pojono commented 6 years ago

Okay. My OS is Ubuntu 16.04. I download https://github.com/claymcleod/nodejs-rest-api-example and extract in home folder

For example, "app.js" has dependencies:

var authController = require('./controllers/AuthController'); var userController = require('./controllers/UserController'); var recipeController = require('./controllers/RecipeController');

Then I opened my terminal and executed: npm i -g dependo

And: dependo -f amd ~/nodejs-rest-api-example-master/ > ~/nodejs-rest-api-example-master/report.html

In report.html I do not see connections between modules.

screenshot from 2018-02-01 16-45-15

amiram commented 6 years ago

I see the connections if I use -f cjs

pojono commented 6 years ago

Fine! It`s work!

Can I exclude from graph npm modules? Like "passport" or "express". And see only my project files dependencies?

I used command dependo -f cjs --exclude "^node_modules" ~/nodejs > ~/nodejs/report.html

1

pojono commented 6 years ago

I exclude node_modules folder and some system dependencies

--exclude "node_modules|fs|path|http"

Working ok. Thank you very much!