Boot is another build tool for Clojure. If you're using it, there is a ClojureScript build task called boot-cljs.
In your boot.boot
file, add this dependency (check
Clojars for the latest version):
:dependencies [...
[adzerk/boot-cljs "1.7.48-3"]
...]
And this source path:
:source-paths #{... "cljs-src" ...}
Add this requires
:
(require '[adzerk.boot-cljs :refer [cljs]])
Then create a file called cljs-src/out/main.cljs.edn
and put this in
there:
{:require [foo.core]}
Replace foo.core
with the main namespace of your
application. Typically, the ClojureScript compiler would read in all
of the .cljs
files in your source directory. But Boot adds a way to
restrict what gets compiled.
Then run:
> boot cljs -O advanced
That will compile your code and output it to out/main.js
If you already have a build task scripted up, you can add the cljs
task to it to have your ClojureScript compiled for you.