Closed OliverJAsh closed 9 years ago
findNestedDependencies
seems to allow dependencies within a module to be found. For example:
define(['dep'], function() {
// Lazy load a file
require(['some_file'], function() {});
});
That option would allow some_file
to show up in the dependency list. It sounds like you want the entire dependency tree to be traversed. We can likely integrate https://github.com/mrjoelkemp/node-dependency-tree for that purpose.
It sounds like you want the entire dependency tree to be traversed
Yes, that's right. I would like to see a graph for my entire dependency tree.
That's what I thought this module did—showed you the whole dependency tree?
Any thoughts on it? @pahen @mrjoelkemp? I'm quite surprised it only shows one level of dependencies. Is that intentional?
The expectation of the api seems to be such that you pass in a directory path if you want a scan of all files to be included in the tree. Your usage only specifies a single file. If you need to specify just that one file, then recursively tracing the tree is one solution. Alternatively, you could look into running madge on the bundled/optimized output using the mainRequireModule setting.
That helps, thanks!
On Tue, 1 Dec 2015, 12:11 Joel Kemp notifications@github.com wrote:
The expectation of the api seems to be such that you pass in a directory path if you want a scan of all files to be included in the tree. Your usage only specifies a single file. If you need to specify just that one file, then recursively tracing the tree is one solution. Alternatively, you could look into running madge on the bundled/optimized output using the mainRequireModule setting.
— Reply to this email directly or view it on GitHub https://github.com/pahen/madge/issues/67#issuecomment-160949545.
No problem! Safe to close this issue? On Dec 1, 2015 8:30 AM, "Oliver Joseph Ash" notifications@github.com wrote:
That helps, thanks!
On Tue, 1 Dec 2015, 12:11 Joel Kemp notifications@github.com wrote:
The expectation of the api seems to be such that you pass in a directory path if you want a scan of all files to be included in the tree. Your usage only specifies a single file. If you need to specify just that one file, then recursively tracing the tree is one solution. Alternatively, you could look into running madge on the bundled/optimized output using the mainRequireModule setting.
— Reply to this email directly or view it on GitHub https://github.com/pahen/madge/issues/67#issuecomment-160949545.
— Reply to this email directly or view it on GitHub https://github.com/pahen/madge/issues/67#issuecomment-160968745.
this LIMITATION of one level dependencies, shell be clearly stated at the beginning of the readme.
I have also wasted some time for this, trying to use another tool (dependo) which is using your project.
Given:
When I run:
The output is:
How come madge is not finding the nested AMD dependencies?