Example project for Cljs/Om using Boot instead of Lein. Inspired by chestnut.
For now, this is a example project instead of a lein template.
You should first install Boot. Also you should be running the latest version.
- Simple Compojure backend
- Simple Om frontend
- LESS to write stylesheets
dev
task starts the whole development workflow- Check
boot dev --help
for options - Repl should automatically include cljs middlewares
- Browser repl included
- No need to change
index.html
, resulting unified JS can be loaded like:advanced
compiled. - Watches for file changes
- *.less changes trigger less compilation
- *.cljs changes trigger cljs compilation
- Live-reloading
- *.js, *.css, *.html changes send notification to browser throught websocket and browser loads the new files
- Check
package
task creates uberjar- Cljs will be compiled using
:advanced
optimization - Uses minified react.js
- Cljs will be compiled using
To start everything run:
$ boot dev
boot.user=>
# App should now be running, you can use following commands to restart the app
boot.user=> (in-ns 'saapas.main)
saapas.main=> (stop) ; Stop app
saapas.main=> (start) ; Start app
saapas.main=> (reset) ; Stop, reload all namespaces, start
If you want a repl where you can execute commands, you can start a nrepl client which connects to the nrepl server started by the dev task by running
$ boot repl -c
- Less compilation and css livereload
- Production build (uberjar)
- Tests