Visually explore package and module dependencies for an Elm project.
Explore dependency graphs for these Elm projects:
Generate a module-graph.json
file for your Elm project with the Python script in this repository.
To generate this file, first save the script, elm-module-graph.py, locally. Execute it, passing it the file path to either an Elm module or an elm-package.json
.
./elm-module-graph.py project/src/Main.elm
or
./elm-module-graph.py library/elm-package.json
By default it writes to a file in the current working directory named module-graph.json
, but you can specify a different output location with the --output
option.
Provide that file to this page: elm-module-graph.
The page displays two graph diagrams. Nodes are vertically sorted so that for each connection the lower node depends on the higher node.
In the Packages graph, clicking a package name will toggle its modules in and out of the Modules graph. In the Modules graph, clicking a module name will highlight the subgraph it's connected to; the nodes are then colored based on distance from the selected module.
Graph diagrams are drawn using justinmimbs/elm-arc-diagram.