diff options
author | Andrea Richiardi <a.richiardi.work@gmail.com> | 2017-01-25 10:51:20 -0800 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2017-01-30 10:41:32 +0700 |
commit | eb1bc430288af6e666e385c634c434a863a4ef8b (patch) | |
tree | c5a12688fbfe2cbc4feda1a2f199edfecad8fe1b /doc | |
parent | a7603ee17681d0a4b95ee114c444772695eaf470 (diff) |
[Fix #1881] Add `cider-cljs-*-repl` defcustom and hook `boot-cljs-repl`
This patch firstly adds two more defcustoms, `cider-cljs-boot-repl` and
`cider-cljs-gradle-repl`, that will be queried by the
`cider-cljs-repl-form` function on `cider-jack-in-clojurescript`
Secondly, it adds a clause in `cider--cljs-repl-types` that allows to
automatically call `adzerk.boot-cljs-repl/start-repl` in case `boot` is
the project type.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/up_and_running.md | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/up_and_running.md b/doc/up_and_running.md index 87cbc505..1277638c 100644 --- a/doc/up_and_running.md +++ b/doc/up_and_running.md @@ -79,8 +79,7 @@ helpful for identifying each host. ## ClojureScript usage -ClojureScript support relies on the -[piggieback][] nREPL middleware being +ClojureScript support relies on the [piggieback][] nREPL middleware being present in your REPL session. Add the following dependencies to your project (`project.clj` in Leiningen based project @@ -104,8 +103,9 @@ or in `built.boot`: repl {:middleware '[cemerick.piggieback/wrap-cljs-repl]}) ``` -Issue <kbd>M-x</kbd> `customize-variable` <kbd>RET</kbd> `cider-cljs-lein-repl` if -you'd like to change the REPL used (the default is `rhino`). +Issue <kbd>M-x</kbd> `customize-variable` <kbd>RET</kbd> 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). Open a file in your project and issue <kbd>M-x</kbd> `cider-jack-in-clojurescript` <kbd>RET</kbd>. This will start up the nREPL @@ -120,7 +120,8 @@ Using Weasel, you can also have a browser-connected REPL. 1. Add `[weasel "0.7.0"]` to your project's `:dependencies`. -2. Issue <kbd>M-x</kbd> `customize-variable` <kbd>RET</kbd> `cider-cljs-lein-repl` +2. Issue <kbd>M-x</kbd> `customize-variable` <kbd>RET</kbd> plus either + `cider-cljs-lein-repl`, `cider-cljs-boot-repl` or `cider-cljs-gradle-repl` and choose the `Weasel` option. 3. Add this to your ClojureScript code: @@ -156,7 +157,7 @@ and this at the end of `build.boot`: ```clojure (require '[adzerk.boot-cljs :refer [cljs]] - '[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]] + '[adzerk.boot-cljs-repl :refer [cljs-repl]] '[pandeiro.boot-http :refer [serve]]) (deftask dev [] @@ -166,11 +167,10 @@ and this at the end of `build.boot`: (cljs))) ``` -2. Start `boot dev` in a terminal. +2. Issue <kbd>M-x</kbd> `customize-variable` <kbd>RET</kbd> `cider-boot-parameters` + and insert `dev`. -3. <kbd>M-x</kbd> `cider-connect` to localhost and select the repl process. - -4. Execute `(start-repl)` at the prompt: `boot.user> (start-repl)`. +3. Open a file in your project and issue <kbd>M-x</kbd> `cider-jack-in-clojurescript`. 5. Connect to the running server with your browser. The address is printed on the terminal, but it's probably `http://localhost:3000`. |