A Clojure library that emits usage diagrams for your project.
Leiningen coordinates:
[com.gfredericks/clj-usage-graph "0.3.0"]
You can use clj-usage-graph
simply by adding it as a dependency
and calling the appropriate functions, but I like this setup in my
~/.lein/profiles.clj
:
{:user
{...
:aliases {"var-graph"
["with-profile" "+clj-usage-graph" "lein" "run"
"-m" "com.gfredericks.clj-usage-graph/var-graph"]
"namespace-graph"
["with-profile" "+clj-usage-graph" "lein" "run"
"-m" "com.gfredericks.clj-usage-graph/namespace-graph"]}}
;; separate profile so that we only have these deps when we're
;; actually using clj-usage-graph
:clj-usage-graph
{... :dependencies [...
[com.gfredericks/clj-usage-graph "0.3.0"]]}
Make sure you have graphviz installed and thus the dot
command
available. The following examples use the aliases defined above.
find src -type f | \
xargs lein var-graph | \
dot -Tsvg -o g.svg
find src -type f | \
xargs lein namespace-graph | \
dot -Tsvg -o g.svg
Copyright © 2013 Gary Fredericks
Distributed under the Eclipse Public License, the same as Clojure.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close