I'm using ClojureScript, Boot and Boot-Cljs to build a Firefox Add-On. Firefox's Add-On SDK assumes a certain directory structure; in my case, I'll need a project-root/data
directory, which will house my contentScriptFile
.
How should I go about building a ClojureScript file, which lives in project-root/src/foo/core.cljs
and either outputting it or moving it to project-root/data
? I've tried using boot sift --move
to no avail (I admittedly don't fully understand how this task is supposed to work, which arguments are required, etc.), using a main.cljs.edn
manifest and tweaking its location, :asset-path
, :output-path
, etc. to no avail.
;; src/main.cljs.edn
{:require [foo.core]
:init-fns [foo.core/init!]
:compiler-options {:output-path "data"}}
;; build.boot
(set-env!
:source-paths #{"src" "data"}
:dependencies '[[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
[adzerk/boot-cljs "1.7.170-3"]])
(require '[adzerk.boot-cljs :refer [cljs]])
(deftask build []
(comp (cljs :optimizations :whitespace)))
I'm intrigued by Boot and want to figure this out, but I have to admit, I've wasted a lot of time on this (and it looks like I'm not alone). Seeing as I already have a simple, working Clojure script which calls the ClojureScript compiler directly - and uses :output-to
to do exactly what I need - I may revert back to that approach in order to wrap this experiment up.