cljs-josh
v0.2.3
Published
Scittle cljs live-reloading server.
Readme
Scittle cljs live-reloading server.
Quickstart | Example project | Features | nREPL
Quickstart
Start the josh watch server:
npm install cljs-josh
npx josh --init # optionally init with a basic project
npx joshThen visit your Scittle-enabled index.html at http://localhost:8000.
When you save your .cljs files they will be hot-loaded into the browser running Scittle.
You can also install the josh command globally: npm i -g cljs-josh and then just call josh.
You can bootstrap a basic Scittle project with josh --init.
You can use the nREPL to evaluate forms.
Example project
See the example for a basic project to start with (or use josh --init).
Start the server to try it out:
cd example
npx joshFeatures
I wanted a Scittle dev experience with these features:
- No build step (the Scittle default).
- Zero configuration required.
- Live reloading on file change, like shadow-cljs.
- Both cljs and CSS files live-reloaded.
- Installable with
npm install. - Pure JavaScript, no Java/binary dependency.
- Minimal library deps.
- nREPL support.
Josh is built on nbb.
nREPL
Josh runs an nREPL proxy which sends all commands to Scittle over a websocket.
It automatically injects the scittle.nrepl.js script tags into the HTML at runtime.
The following editor specific instructions assume you have already:
- Set up a basic Scittle project (
josh --init). - run
joshto start the server.nREPL server started on port 34581 on host 127.0.0.1 - nrepl://127.0.0.1:34581 - Loaded
http://localhost:8000in your browser. - Opened main.cljs in your editor.
Editor-specific instructions are below.
VS Code
You need to have the Calva extension installed.
- Click on "REPL ⚡️" in the bottom left.
- Choose "Connect to a running REPL in your project".
- Choose "ClojureScript nREPL Server".
Now you can evaluate forms with alt-Enter.
Cider
- Issue
cider-connect-cljs, uselocalhost, and enter the nREPL port. - Use
nbbas REPL type.
Now you can evaluate forms.
If that doesn't get you up and running you may need to use sesman-link-with-buffer and select the existing entry.
Note: cider-inspect work.
If you have cider-default-cljs-repl set in your Emacs config it may also help to comment that out:
;;(setq cider-default-cljs-repl 'shadow)vim-fireplace
- Run
:CljEval (josh/repl)to tell vim-fireplace it's in a ClojureScript repl.
Now you can evaluate forms with cpp and cpip etc.

