Last active
October 16, 2015 15:52
-
-
Save mathew-hall/1078089b1afb9f50e957 to your computer and use it in GitHub Desktop.
Angular Dependency Graphviz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
(echo "digraph g{"; grep -rh module js | grep -v '[\S+]' | sed 's/.*module(//;' | tr -d " (')[];" | tr , " " | awk '{if($1!="" && $1 != " "){for(i = 2; i <= NF; i++){ print "\"",$1,"\"","->", "\"",$i,"\""; }}}'; echo "}") > /tmp/deps.dot | |
dot -Tpdf /tmp/deps.dot -o/tmp/deps.pdf && open /tmp/deps.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment