-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.boot
80 lines (71 loc) · 2.99 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
72
73
74
75
76
77
78
79
80
;; vi:syntax=clojure
(set-env!
:source-paths #{"src"}
:resource-paths #{"resources"}
:dependencies '[[adzerk/boot-cljs "1.7.228-1" :scope "test"]
[adzerk/boot-cljs-repl "0.3.3" :scope "test"]
[adzerk/boot-reload "0.4.12" :scope "test"]
[pandeiro/boot-http "0.7.3" :scope "test"]
[com.cemerick/piggieback "0.2.1" :scope "test"]
[crisptrutski/boot-cljs-test "0.2.2-SNAPSHOT" :scope "test"]
[weasel "0.7.0" :scope "test"]
[org.clojure/tools.nrepl "0.2.12" :scope "test"]
[deraen/boot-less "0.2.1" :scope "test"]
; Clojure
[org.clojure/clojure "1.8.0"]
[hiccup "1.0.5"]
[environ "1.0.0"]
[compojure "1.1.5"]
[ring/ring-core "1.4.0"]
[metosin/ring-http-response "0.6.5"]
[org.clojure/data.json "0.2.6"]
[http-kit "2.1.18"]
; Clojurescript
[org.clojure/clojurescript "1.9.225"]
[cljs-ajax "0.5.4"]
[binaryage/devtools "0.8.1"]
[reagent "0.6.0-alpha"]
[re-frame "0.7.0"]
[bidi "2.0.8"]
[kibu/pushy "0.3.6"]
[degree9/firebase-cljs "1.0.0"]
])
(require
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl]]
'[adzerk.boot-reload :refer [reload]]
'[pandeiro.boot-http :refer [serve]]
'[crisptrutski.boot-cljs-test :refer [test-cljs]]
'[deraen.boot-less :refer [less]])
(deftask dev []
(comp
(watch)
(serve :reload true :port 8080 :handler 'app.server.core/app :httpkit true)
(less)
(reload :on-jsload 'app.core/mount-root :asset-path "public")
(cljs :compiler-options {:preloads '[devtools.preload]})))
(deftask build-cljs []
(comp
(less :compression true)
(cljs :optimizations :advanced)))
(deftask build-jar []
(comp
(build-cljs)
(aot :namespace '#{app.server.core})
(pom :project 'crossed
:version "1.0.0")
(uber)
(jar :file "crossed.jar" :main 'app.server.core)
(sift :include #{#"\.jar$"})
(target)))
(deftask testing []
(merge-env! :resource-paths #{"test/cljs"})
(task-options! test-cljs {:namespaces '#{app.test} :js-env :phantom})
identity)
(deftask test-once []
(comp (testing)
(test-cljs :exit? true)))
(deftask auto-test []
(comp (testing)
(watch)
(test-cljs)))