pahen / madge

Create graphs from your CommonJS, AMD or ES6 module dependencies
MIT License
9.09k stars 318 forks source link

madge --depends doesn't seem to include --require-config #40

Closed whawker closed 9 years ago

whawker commented 10 years ago

Hi,

I'm attempting to find orphaned modules, using the --depends option, but it doesn't seem to consider paths in the require config.

madge --require-config modules/main.js --depends underscore modules yields no results even though underscore is one of my most common dependencies.

modules/main.js

require.config({
    paths: {
        underscore: '../bower_components/underscore/underscore'
        // (etc)
    }
});

modules/app.js

define(function (require) {
    'use strict';
    var $ = require('jquery'),
        _ = require('underscore');
   //...etc
});
pahen commented 9 years ago

Hi, this has been fixed in v0.4.0 which will be published to NPM soon. Let me know if it still doesn't work.