I’m trying to implement examples from the open source book Modern CLJS
I’ve already write a runnable boot task to compile, watch and serve my project, here’s code for build.boot
:
; vim: set ft=clojure:
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"html"}
:dependencies '[[org.clojure/clojure "1.10.3"] ;; add CLJ
[org.clojure/clojurescript "1.10.866"] ;; add CLJS
[adzerk/boot-cljs "2.1.5"]
[pandeiro/boot-http "0.8.3"]
[org.clojure/tools.nrepl "0.2.13"]
[adzerk/boot-reload "0.6.1"]
[adzerk/boot-cljs-repl "0.4.0"]
[cider/piggieback "0.3.9"] ;; needed by bREPL
[weasel "0.7.1"]]) ;; needed by bREPL
(require '[adzerk.boot-cljs :refer [cljs]]
'[pandeiro.boot-http :refer [serve]]
'[adzerk.boot-reload :refer [reload]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]])
(deftask dev
"Launch Immediate Feedback Development Environment"
[]
(comp
(serve :dir "target")
(watch)
(reload)
(cljs-repl)
(cljs)
(target :dir #{"target"})))
I set up my interactive development environment by running the followings in different consoles:
boot dev
boot repl -c
In the boot repl, I typed (start-repl), which, however, takes forever to finish and block my input.
Like this:
<< started Weasel server on ws://127.0.0.1:39371 >>
<< waiting for client to connect ... Connection is ws://localhost:39371
Writing boot_cljs_repl.cljs...
However, it’s wired since I once successfully start the bREPL, yet now I can’t.