Opinionated example project for ClojureScript using Boot instead of Leiningen. Was inspired by chestnut but has grown since to include other stuff to demonstrate Boot.
This is not an Leiningen template as I don't believe in setting up complex projects automatically. Instead you should study this project and copy only stuff you need and understand.
You should first install Boot. Also you should be running the latest version.
- Uses component and reloaded.repl to provide utilities to
start
,stop
andreset
(reload) the app. - Simple Compojure backend
- Simple Om frontend
- LESS to write stylesheets
dev
task starts the whole development workflow- Check
boot dev --help
for options - Browser repl included
- Watches for file changes
- *.less changes trigger less compilation
- *.cljs changes trigger cljs compilation
- Live-reloading
- *.js, *.css, *.html changes send notification to browser thought 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=> (stop) ; Stop app
boot.user=> (start) ; Start app
boot.user=> (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
To the extent possible under law,
Juho Teperi
has waived all copyright and related or neighboring rights to
Saapas.
This work is published from:
Suomi.