boot-cljs-repl
boot-cljs-repl copied to clipboard
boot-cljs-repl pollutes project directory
boot-cljs-repl is polluting my project directory by compiling to "out/" instead of "target/*".
(deftask dev []
(comp
(watch :verbose true)
(speak)
(reload :asset-path "public"
:on-jsload 'my.project/restart!)
(cljs-repl)
(cljs :optimization :none
:source-map true
:compiler-options {:verbose true})
(repl :server true)))
When I connect to the nREPL server and type (start-repl)
to start the CLJS REPL, an "out/" directory is created.
Thanks for the report @DomKM. I can reproduce this with 0.2.0
.
I assume it might be an issue with weasel?
I think Weasel exposes what's necessary but boot-cljs-repl does not try to set :output-dir
and doesn't expose it as a task option :output-dir
to pass on, either.
I am working on a fix for this locally and would be glad to contribute the change back. I'll test it and report back soon.
EDIT: I think I may be wrong about Weasel. It exposes this function, used by boot-cljs-repl: https://github.com/tomjakubowski/weasel/blob/master/src/clj/weasel/repl/websocket.clj#L32-L38. I've tried to use it to pass in an :output-dir
option here: https://github.com/pandeiro/boot-cljs-repl/commit/a7a5d5f73aaf33e82ed9488429ba363a4ca19c0f . Still when I try using this updated version and specifying :output-dir
in cljs-repl
, the out
dir is still created.
I tried setting output-dir to Boot-cljs tmp-dir which I think would be the correct value, but didn't have success. The repl kept creating out
dir.
https://github.com/adzerk-oss/boot-cljs-repl/compare/repl-output-dir?expand=1
Also related #16, #22
seems like for now on 0.4.0-SNAPSHOT, this works:
(task-options!
start-repl {:cljs-repl-opts {:output-dir "target/public/main.out"}})
Thanks to @Deraen for this relevant commit: https://github.com/adzerk-oss/boot-cljs-repl/commit/04b6f44bb4f630746ae49dcb464ef9e3a82c4379