Use figwheel to make an nREPL server available in ClojureScript during development
Opened this issue · 2 comments
WilliamParker commented
There was some discussion of setting up the project.clj so that we could create an nREPL server for ClojureScript during development. See #285 (comment) and #285 (comment)
This didn't really seem like part of issue 285 so I decided to create a new issue to track on it. I agree that this would be a good thing to have.
alex-dixon commented
I can implement if it's desired. For those who use IntelliJ it's dangerously close to having the same REPL setup for CLJS as CLJ.
I think the changes would include:
- Add
dev
folder to the project root with a user.clj file that can be loaded into alein repl
or autoloaded by adding:repl-options {:init-ns user}
under dev profile in project.clj. - Add
dev
to:source-paths
- Add the following
:figwheel
options to the top level of project.clj:
:figwheel
{:http-server-root "public"
:nrepl-port 7002
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
- Add figwheel-sidecar to dev dependencies (should use same version as lein-figwheel)
- Add com.cemerick/piggieback to dev dependencies
WilliamParker commented
Sounds good to me @alex-dixon that would be helpful, thanks. Regarding adding a namespace in /dev to the :source-paths - we'd probably want to avoid that namespace being added into the deployed clara-rules jar though.