forked from thenonameguy/cljs-presentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.boot
71 lines (60 loc) · 2.06 KB
/
build.boot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(set-env!
:source-paths #{"sass" "src/cljs"}
:resource-paths #{"resources"}
:dependencies '[[adzerk/boot-cljs "1.7.48-6" :scope "test"]
[adzerk/boot-cljs-repl "0.2.0" :scope "test"]
[adzerk/boot-reload "0.4.1" :scope "test"]
[pandeiro/boot-http "0.6.3" :scope "test"]
[org.clojure/clojurescript "1.7.122"]
[crisptrutski/boot-cljs-test "0.2.0-SNAPSHOT" :scope "test"]
[reagent "0.5.0"]
[re-frame "0.7.0-alpha-2"]
[json-html "0.3.8"]
[mathias/boot-sassc "0.1.5" :scope "test"]])
(require
'[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]]
'[mathias.boot-sassc :refer [sass]])
(deftask build []
(comp
(cljs)
(sass :output-dir "css")))
(deftask run []
(comp (serve)
(watch)
(cljs-repl)
(reload)
(build)))
(deftask production []
(task-options! cljs {:optimizations :advanced}
sass {:output-style "compressed"})
identity)
(deftask development []
(task-options! cljs {:optimizations :none :source-map true}
reload {:on-jsload 'cljs-presentation.app/on-js-reload}
sass {:line-numbers true
:source-maps true})
identity)
(deftask dev
"Simple alias to run application in development mode"
[]
(comp (development)
(run)))
(deftask testing []
(set-env! :source-paths #(conj % "test/cljs"))
identity)
;;; 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)
(watch)
(test-cljs :js-env :phantom)))