Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
:source-paths #{"src/cljs" "src/clj"}
:resource-paths #{"resources"}
:dependencies '[[adzerk/boot-cljs "1.7.228-1" :scope "test"]
[adzerk/boot-cljs-repl "0.3.0" :scope "test"]
[adzerk/boot-reload "0.4.5" :scope "test"]
[pandeiro/boot-http "0.7.2" :scope "test"]
[com.cemerick/piggieback "0.2.1" :scope "test"]
[org.clojure/tools.nrepl "0.2.12" :scope "test"]
[weasel "0.7.0" :scope "test"]
[org.clojure/clojurescript "1.7.228"]
[crisptrutski/boot-cljs-test "0.1.0-SNAPSHOT" :scope "test"]
[reagent "0.5.0"]
[org.martinklepsch/boot-garden "1.2.5-3" :scope "test"]])
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
'[adzerk.boot-reload :refer [reload]]
'[pandeiro.boot-http :refer [serve]]
'[crisptrutski.boot-cljs-test :refer [test-cljs]]
'[org.martinklepsch.boot-garden :refer [garden]])
(deftask build []
(comp (speak)
(garden :styles-var 'michaelh-sandbox.styles/screen
:output-to "css/garden.css")))
(deftask run []
(comp (serve)
(deftask production []
(task-options! cljs {:optimizations :advanced}
garden {:pretty-print false})
(deftask development []
(task-options! cljs {:optimizations :none :source-map true}
reload {:on-jsload '})
(deftask dev
"Simple alias to run application in development mode"
(comp (development)
(deftask testing []
(set-env! :source-paths #(conj % "test/cljs"))
;;; This prevents a name collision WARNING between the test task and
;;; clojure.core/test, a function that nobody really uses or cares
;;; about.
(ns-unmap 'boot.user 'test)
(deftask test []
(comp (testing)
(test-cljs :js-env :phantom
:exit? true)))
(deftask auto-test []
(comp (testing)
(test-cljs :js-env :phantom)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment