stack:
-
language: clojure / clojurescript [1]
-
view: reagent (react interface)
-
rx / state: re-frame
-
routing: bidi
-
development environment: figwheel
-
css: sass
-
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.
- 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.
run make
or make help
to see available commands
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
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.
# npm install -g phantomjs-prebuilt
make test # execute tests once and exit
make test-watch # execute tests on file changes
the above command assumes that you have phantomjs installed. however, please note that doo can be configured to run cljs.test in many other js environments (phantom, chrome, ie, safari, opera, slimer, node, rhino, or nashorn).
make build
this will simulate a drone build locally through drone exec
. js will be optimized,
so it takes a while.
make clean
removes compiled css, js, java class files, etc