clj -Sdeps '{:deps {github-mfikes/a69c72e65330e92625bfa81d5501dad4 {:git/url "https://gist.github.com/mfikes/a69c72e65330e92625bfa81d5501dad4" :sha "700c681f61eae580be3f52181e15c221fa23b77c"}}}' -m cljs.main -re node -r
This sets you up to use Alex Miller's new add-lib
capability, hacked into a revision of ClojureScript.
Once the REPL is running, call add-lib
to dynamically require a Git Dep library (or a :mvn/version
, or a :local/root
dep):
cljs.user=> (require '[cljs.repl :refer [add-lib]])
nil
cljs.user=> (add-lib 'andare {:git/url "https://github.com/mfikes/andare" :sha "8a06ac29054c261d97539aa85a2aed0a41012313"})
Cloning: https://github.com/mfikes/andare
Checking out: https://github.com/mfikes/andare at 8a06ac29054c261d97539aa85a2aed0a41012313
true
cljs.user=> (require '[clojure.core.async :refer [chan <! >! go]])
nil
cljs.user=> (def c (chan))
#'cljs.user/c
cljs.user=> (go (prn (<! c)))
#object[cljs.core.async.impl.channels.ManyToManyChannel]
cljs.user=> (go (>! c :hello))
#object[cljs.core.async.impl.channels.ManyToManyChannel]
cljs.user=> :hello
cljs.user=>