This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-28
Channels
- # announcements (3)
- # babashka (36)
- # beginners (77)
- # boot (3)
- # chlorine-clover (10)
- # cider (27)
- # clj-kondo (1)
- # cljs-dev (4)
- # clojure (256)
- # clojure-belgium (1)
- # clojure-europe (9)
- # clojure-uk (18)
- # clojuredesign-podcast (9)
- # clojurescript (54)
- # cryogen (8)
- # cursive (3)
- # data-science (1)
- # datomic (2)
- # duct (31)
- # events (1)
- # exercism (3)
- # fulcro (116)
- # joker (20)
- # kaocha (5)
- # meander (2)
- # nrepl (4)
- # off-topic (10)
- # other-languages (15)
- # re-frame (18)
- # reagent (4)
- # shadow-cljs (44)
- # sql (14)
- # tools-deps (17)
Is it possible to connect chlorine to a repl created via the clj
CLI tool? For example, if I have a REPL started via:
clj --main cljs.main --compile app --repl
I don’t think I can connect chlorine to the above, but is it possible to start the above as a socket repl and then connect chlorine?Just thought i would ask before I dig into the code 😉
Yes, it is possible. There are examples on the project's README.
In fact, I don't think any tool starts a socket repl by default, only nRepl :)
Sorry, I meant I a ClojureScript repl…should have clarified
Ah, OK :). There is a command to open a specific socket repl for ClojureScript (on the browser, on nashorn, or node I think). Then you can connect to then, it's only a little limited in functionality. I'll look up these commands for you :)
(and also add then in the README too :D)
Okay, found it: you can start a ClojureScript socket REPL with the following command, for example:
clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.597"}}}' -J-Dclojure.server.browser="{:port 4444 :accept cljs.server.browser/repl}"
When you ask Chlorine to connect to port 4444, it'll start a browser and connect a REPL to it
Yup, that does it!