adding a proto-repl playground

This commit is contained in:
anatoly 2016-12-02 16:33:40 -06:00
parent f38bc2f0e7
commit c9945aef5b
3 changed files with 23 additions and 5 deletions

View file

@ -20,6 +20,10 @@
[org.clojure/tools.nrepl "0.2.12" :scope "provided"]
[com.datomic/datomic-free "0.9.5359" :scope "provided" :exclusions [joda-time]]
;; proto repl for fun and joy
[proto-repl "0.3.1" :scope "provided"]
[proto-repl-charts "0.3.2" :scope "provided"]
;; boot clj
[boot/core "2.6.0" :scope "provided"]
[adzerk/bootlaces "0.1.13" :scope "test"]

15
dev/clj/proto_play.clj Normal file
View file

@ -0,0 +1,15 @@
(ns proto-play
(:require [mount.tools.graph :as mount]
[proto-repl-charts.graph :as proto]))
(defn mount->proto [graph]
(reduce (fn [g {:keys [name deps]}]
(-> g
(update :nodes conj name)
(update :edges conj (-> deps (conj name) vec))))
{}
graph))
(->> (mount/states-with-deps)
mount->proto
(proto/graph "a proto graph of mount states"))

View file

@ -24,4 +24,3 @@
meta-with-ns)
states)
(sort-by :order)))))