This episode is for subscribers only. Sign Up or Log in to watch it.

8. The ClojureScript Compiler

Published 17 June 16

To be effective at programming, you have to understand your tools. In this episode we’ll peel a few layers away, and use the ClojureScript compiler without any help from Leiningen, Cljsbuild or Figwheel. You’ll learn about compiler options, levels of optimization, the role of the Google Closure Library, and how to confgure the compiler for development and production use.

Show notes

If you’re just starting out with ClojureScript, either with or without tinkering with Clojure first, it’s easy to get lost in ClojureScript’s setup and tooling.

There are various projects and tools that try to make your life easier, but which ones do you really need, and do the benefits outweigh the added complexity?

In this and following episodes we’ll start with the most basic setup, and work our way up to more complex tools. If you get stuck with some of the more advanced tools, try taking a step back. Having less layers involved can make it more clear what’s going on.

For this first episode we’ll use the standalone cljs.jar. You can find it on ClojureScript’s Github site under “releases”.

curl -L https://github.com/clojure/clojurescript/releases/download/r1.9.36/cljs.jar > cljs.jar

JAR is short for “Java Archive”. Don’t worry though, no Java code has been used in the making of this video, but we will make use of the Java Runtime Environment, since that is needed to power Clojure.