A basic setup for web projects using Clojure/Clojurescript.
You can follow the evolution by going through the commits!
Step 0: Installing Vagrant
To isolate development environments, I put every project in it's own Vagrant box. You can skip over this, use docker or some other way of isolating environments. Or you install Vagrant and follow along :)
Step 1: Adding Clojure
We are adding a
project.clj with dependencies for
lein-ring. Pretty straightforward, I guess.
Step 2: Adding ClojureScript
We are also going to use ClojureScript. For this,
Step 3: Adding Garden
Garden is a CSS preprocessor much like SASS, but it uses Clojure data structures. One advantage is that this means you can use any Clojure code that outputs structures Garden can work with to generate CSS.
Step 4: Adding figwheel
This step is not about adding something new, but getting productive. With figwheel, code changes in your ClojureScript code are pushed to the browser directly, without the need to reload.