Fork me on GitHub
#boot
<
2017-09-01
>
kenny21:09:06

How are you guys running a CLJS nodejs REPL? Presumably you don't need a browser connection to do this. I don't see a way in boot-cljs-repl to do this.

richiardiandrea21:09:56

@kenny I could not do it as well and I am using shadow-cljs for that at the moment. It should be possible though. I personally haven't had time to work on it yet

kenny21:09:59

Ok - just making sure there wasn't a way to do it already out there. This post: https://lambdaisland.com/guides/clojure-repls/clojurescript-repls has some info on how to do it. Seems like that could be wrapped up in a Boot task.

kenny21:09:59

@richiardiandrea Turns out it's much easier than I thought: Run

boot watch cljs-repl
Then in the REPL:
(require 'cemerick.piggieback)
=> nil
(require '[cljs.repl.node])
=> nil
(cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env))
ClojureScript Node.js REPL server listening on 56999
To quit, type: :cljs/quit
=> nil
(+ 1 1)
=> 2

richiardiandrea21:09:45

@kenny that's awesome thanks for sharing!