Giter VIP home page Giter VIP logo

Comments (6)

craiggoldstone avatar craiggoldstone commented on May 11, 2024

@Baccanno - I think that's the same root issue as the one I opened last week (#56). Do you have the same project setup where the baseUrl doesn't reflect the same location as the local file system?

from madge.

TooBug avatar TooBug commented on May 11, 2024

any update on this?

from madge.

Baccanno avatar Baccanno commented on May 11, 2024

Sorry I did not continue using Madge, I resolved my issue by isolating the file that was causing trouble and load it first in its own require() callback.

from madge.

colorpump avatar colorpump commented on May 11, 2024

Same problem here: The child dependencies in my amd project are not shown.
I broke it down to a simple example.
directories:

www/
  app/
    main.js
    math.js
    messages.js
  lib/
    print.js
  config.js

I made sure that baseUrl reflects the same location as I call the madge cmd.
config.js:

requirejs.config({
    baseUrl: '../',  // path outside of the www folder
    paths: {
      // I left paths emtpy as madge doesn't seem to recognize them
    }
});

main.js:

define(['www/app/messages', 'www/lib/print'],

print.js:

define(['www/app/math']

command:

madge  ./www/app/main.js --format amd --find-nested-dependencies --dot > graph.gv

output:

digraph G {
  "main";
  "www/app/messages";
  "www/lib/print";
  "main" -> "www/app/messages";
  "main" -> "www/lib/print";
}

But I miss "www/lib/print"->"www/app/math'"

from madge.

colorpump avatar colorpump commented on May 11, 2024

I saw in #67 that what I'm loking for, is not implemented. I want to see the whole dependency tree. That's just possible if calling madge ./whole_directory but that shows me also files, which are never been called. To optimize each time my project just to run madge on it, would be annoying. A flag to get recursive dependencies, would be really nice. Until than I use a code snippet which gives me the wished result in the Browser console (also annoying): rtree.js

from madge.

pahen avatar pahen commented on May 11, 2024

I'm refactoring Madge now and planning to release 1.0.0 soon and will try to have this fixed then.

from madge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.