You need Java and node.js.
After pulling, run:
npm installshadow-cljs pomUsing the POM, the project can be fully recognized by IDEA
npx shadow-cljs watch frontend browser-testThis will watch both, :frontend and :test build-ids in order to reload the browser and run tests every time a file is changed.
The watch process will have compiled the given code to public/js. The generated .js must be loaded in a browser in order for the REPL to be available.
Run Configurations → + → Clojure REPL → Remote
- nREPL
- Use port from file with localhost
- Use standard port file
Switch to CLJS by calling
(shadow/repl :frontend)To drop back to CLJ call
:cljs/quitnpx shadow-cljs node-replnpx shadow-cljs browser-replThe watch in Development will already run tests. Alternatively you can do any of the following.
You can load a test-file in the REPL and call (run-tests).
Compile and run all tests (any files with namespace ending in -test):
npx shadow-cljs compile test
node out/node-tests.js- When there are failures, the output will show which assertion failed and why
- If all tests pass, the exit-code is zero
shadow-cljs release frontend