bindscript is antoher tool for interactive coding ClojureScript. It displays values from its bindings forms in a heads-up in the browser.
Add dependency to your project:
witek/bindscript {:mvn/version "RELEASE"}
Require:
[bindscript.api :refer [def-bindscript]]
Put bindscripts into any ClojureScript file. Similar to an usual let
expression:
(def-bindscript ::simple
test-data [1 2 3 5 8]
incremented (map inc test-data))
Bindscript catches exceptions, if you make a mistake:
(def-bindscript :some.project/with-error
test-data "some string"
result (conj "some string" "more text"))
Use :spec
keyword to conform the last binding to a clojure spec:
(def-bindscript :some.project/with-spec
k1 :some/keyword
:spec qualified-keyword?
:spec simple-keyword?)
Let figwheel load it into your browser and bindscript display the values:
Get insights, modify your code, loop!