Skip to content
/ cdeps Public

Generate name-space/package dependecy graphs for Clojure source

Notifications You must be signed in to change notification settings

na-ka-na/cdeps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdeps

Generate namespace or package dependency graphs for Clojure source.

The graph can be generated at various levels - complete src, single ns, single package.

Additionally you can also get the reverse graph of 'what ns/packages dependUpon a ns/package'

The graph is available in many forms - Clojure map, .xml, .dot, .png

Note: for images you need dot (http://www.graphviz.org/) added to your system path. To verify run 'dot -V' on command line.

cdeps-0.0.1-ns-deps.png

Try it

To begin clone the repo. Then generate libs and run the repl:

../cdeps$ lein deps
...
../cdeps$ java -cp lib/clojure-1.2.0.jar:lib/clojure-contrib-1.2.0.jar:src clojure.main
Clojure 1.2.0
user=> (require 'cdeps)
nil
user=> (def n (cdeps/get-ns-deps "../compojure/src"))
#'user/n
user=> (pprint n)
{"compojure.core"
  ("clojure.contrib.def"  "ring.middleware.params"
   "ring.middleware.cookies" "clout.core"
   "compojure.response"),
 "compojure.response"
  ("ring.util.response" "java.io.File" "java.io.InputStream"
   "clojure.lang.APersistentMap" "clojure.lang.IDeref"
   "clojure.lang.IFn" "clojure.lang.ISeq"),
 "compojure.route"
  ("compojure.core" "ring.util.response" "ring.util.codec")}
user=> (cdeps/show-deps-as-image n)
Generating xml file tmp/deps736822425291793699.xml ...
Generating dot file tmp/deps5214394967951933127.dot ...
Generating image-file tmp/deps4613943607332204272.png ...
"tmp/deps4613943607332204272.png"
user=> 

Documentation

For more documentation see autodoc/index.html

For examples see examples/ directory

About

Generate name-space/package dependecy graphs for Clojure source

Resources

Stars

Watchers

Forks

Packages

No packages published