adding a proto-repl playground
This commit is contained in:
parent
f38bc2f0e7
commit
c9945aef5b
3 changed files with 23 additions and 5 deletions
|
|
@ -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
15
dev/clj/proto_play.clj
Normal 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"))
|
||||
|
|
@ -24,4 +24,3 @@
|
|||
meta-with-ns)
|
||||
states)
|
||||
(sort-by :order)))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue