From dae5285ea9cc512f8fc3cfed3a248ae0dc273978 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 1 Mar 2018 11:12:09 +0700 Subject: [#2202] Decouple the ClojureScript REPL selection from the build tool being used Now the user will simply be prompted for the REPL they want to start. Later we should make this smarter - compute a good default based on the project deps, don't show unsupported options, etc. --- doc/up_and_running.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'doc/up_and_running.md') diff --git a/doc/up_and_running.md b/doc/up_and_running.md index 7b12f345..ea4e7c9e 100644 --- a/doc/up_and_running.md +++ b/doc/up_and_running.md @@ -103,9 +103,10 @@ or in `built.boot`: repl {:middleware '[cemerick.piggieback/wrap-cljs-repl]}) ``` -Issue M-x `customize-variable` RET and either -`cider-cljs-lein-repl`, `cider-cljs-boot-repl` or `cider-cljs-gradle-repl` if -you'd like to change the REPL used (the default is `rhino` where possible). +There are many ClojureScript REPLs out there and it's often hard to wrap your +head around them and the differences between them. You'd do well to read [this +awesome article](https://lambdaisland.com/guides/clojure-repls/clojurescript-repls) +before proceeding with the rest of the instructions listed here. Open a file in your project and issue M-x `cider-jack-in-clojurescript` RET. This will start up the nREPL @@ -120,9 +121,9 @@ Using Weasel, you can also have a browser-connected REPL. 1. Add `[weasel "0.7.0"]` to your project's `:dependencies`. -2. Issue M-x `customize-variable` RET plus either - `cider-cljs-lein-repl`, `cider-cljs-boot-repl` or `cider-cljs-gradle-repl` - and choose the `Weasel` option. +2. Issue M-x `cider-jack-in-clojurescript` RET and choose + the `Weasel` option when prompted about the ClojureScript REPL type you want + to use. 3. Add this to your ClojureScript code: @@ -196,15 +197,9 @@ You can also use [Figwheel](https://github.com/bhauman/lein-figwheel) with CIDER :nrepl-middleware [cemerick.piggieback/wrap-cljs-repl] ``` -4. Instruct CIDER to use Figwheel in your Emacs config: +4. Start the REPL with `cider-jack-in-clojurescript` (C-c M-J) -```el -(setq cider-cljs-lein-repl "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))") -``` - -5. Start the REPL with `cider-jack-in-clojurescript` (C-c M-J) - -6. Open a browser to the Figwheel URL so that it can connect to your application. +5. Open a browser to the Figwheel URL so that it can connect to your application. You now have two nREPL connections, one for Clojure and one for ClojureScript. CIDER will determine which to use based on the type of file you're editing. -- cgit v1.2.3