![| center](https://camo.githubusercontent.com/c000c84fe3e3410466f56f5f47b3e03033a20339f30f624a1a5c4c6cd8fd675c/687474703a2f2f706168656e2e6769746875622e696f2f6d616467652f6c6f676f2e737667) %% run start ```ts const {LinkPreview} = customJS return LinkPreview.getLinkPreviewFromUrl("https://github.com/pahen/madge") ``` %% <div class="nifty-link-card-container"> <a class="nifty-link-card" href="https://github.com/pahen/madge" target="_blank"> <div class="nifty-link-card-text"> <div class="nifty-link-card-title line-clamp-2">GitHub - pahen/madge: Create graphs from your CommonJS, AMD or ES6 module dependencies</div> <div class="nifty-link-card-description">Create graphs from your CommonJS, AMD or ES6 module dependencies - GitHub - pahen/madge: Create graphs from your CommonJS, AMD or ES6 module dependencies</div> <div class="nifty-link-href"> <img class="nifty-link-icon" src="https://github.com/fluidicon.png"> https://github.com/pahen/madge </div> </div> <div class="nifty-link-image-container"> <div class="nifty-link-image" style="background-image: url('https://opengraph.githubassets.com/4a46847d06b3ec681e07f44b93131c93b2cf738b0d029d56f84e3f488d6db9de/pahen/madge')"> </div> </div> </a> </div> %% run end %% **Madge** is a developer tool for generating a visual graph of your module dependencies, finding circular dependencies, and giving you other useful info. Joel Kemp's awesome [dependency-tree](https://github.com/mrjoelkemp/node-dependency-tree) is used for extracting the dependency tree. - Works for JavaScript (AMD, CommonJS, and ES6 modules) - Also works for CSS preprocessors (Sass, Stylus, and Less) - NPM installed dependencies are excluded by default (can be enabled) - All core Node.js modules (assert, path, fs, etc) are excluded - Will traverse child dependencies automatically ## Examples > Graph generated from madge's own code and dependencies. ![](https://camo.githubusercontent.com/af3533668ecd688544360f0096056b6ee63a6662b43bb92d50bd4906618d8fc6/687474703a2f2f706168656e2e6769746875622e696f2f6d616467652f6d616467652e737667) > A graph with circular dependencies. Blue has dependencies, green has no dependencies, and red has circular dependencies. ![](https://camo.githubusercontent.com/286013b1c7dcce920acaebae48fdd5438675899be603afaee2b5c3ff75caff0a/687474703a2f2f706168656e2e6769746875622e696f2f6d616467652f73696d706c652e737667) ## See it in action [![asciicast](https://asciinema.org/a/l9tM7lIraCpmzH0rdWw2KLrMc.svg)](https://asciinema.org/a/l9tM7lIraCpmzH0rdWw2KLrMc)