Skip to content

Using a Git Checkout of the ClojureScript Compiler

Evan Mezeske edited this page May 17, 2013 · 5 revisions

To use an arbitrary version of the ClojureScript compiler with lein-cljsbuild, create a folder in your project dir, for example comp/. Inside this folder, clone the compiler:

$ cd comp && git clone git://github.com/clojure/clojurescript.git

If you already have a checkout of the compiler, you could create a symlink instead:

$ cd comp && ln -s ../../path/to/clojurescript clojurescript

Either way, once you have the checkout setup, you need to configure Leiningen to put it on the classpath.

Leiningen 2.x

Add the necessary clojurescript source directories to the classpath via :source-paths. Make sure that it includes your regular Clojure source path as well, if your project uses Clojure as well as ClojureScript:

(defproject example "0.0.0"
  {:source-paths
    ["src"
     "comp/clojurescript/src/clj"
     "comp/clojurescript/src/cljs"]}})