visual representation of the require structure of your application, excluding the node_modules folder. • Purpose: To identify cycles in the graph and to provide a map on how to reorganize. • Why eliminate circular/cyclic dependencies? ◦ Files with cyclic dependencies are harder to test ◦ Inhibit re-use of components ◦ Creates highly coupled code ◦ Leads to messy spaghetti code • Strategies to Eliminate Cycles: ◦ Combine files needing the same resources into one big file ◦ Keep files focused on a single purpose ◦ Break apart a large fille doing too much into smaller files
brew install graphvis madge --image /path/to/img.svg ./app.js Madge and graphvis make it very easy to create visual graphs of your service/application.