ulysses (front-end)
stack:
-
language: clojure / clojurescript [1]
-
rx / state: re-frame
-
routing: secretary
-
development environment: figwheel
-
css: sass
-
tests: doo
-
ci: drone [2]
[1] definitely use parinfer for clojure development. it makes paren/bracket management truly painless...fun even. available for atom, sublime, vim, etc.
[2] NOTE any time .drone.yml
is changed (even a comment), a new version of .drone.sec
must be generated. see comment in .drone.yml for more info.
prerequisites
- docker [3] [4]
- java jdk 8 [5]
- leiningen 2
- filewatcher
- make
optional:
- drone cli tools [6]
[3] docker will eventually be the only dependency
[4] if on mac/windows, you will need to use docker machine / virtual box then source the
daemon connection using eval $(docker-machine env default)
[5] java 7 probably works too, although that doesn't really matter given [3]
[6] drone cli tools allow for simulating a drone build though its
exec subcommand. can be run with make build
, then you can just open index.html in a web browser.
make
run make
or make help
to see available commands
dev build w/ live reloading
make start
figwheel will automatically push cljs and css changes to the browser, as well as run tests (to be configured).
wait a bit, then browse to http://localhost:3449
sass
make sass-watch
requires filewatcher, see above.
watches sass files, then uses sassc in an ephemeral docker container to rebuild when a file changes. also builds sourcemaps.
prod build
make build
this will simulate a drone build locally through drone exec
. js will be optimized,
so it takes a while.
cleanup
make clean
removes compiled css, js, java class files, etc