-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.boot
77 lines (64 loc) · 2.32 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
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"resources"}
:dependencies '[[adzerk/boot-cljs "1.7.228-2" :scope "test"]
[adzerk/boot-cljs-repl "0.3.3" :scope "test"]
[adzerk/boot-reload "0.4.13" :scope "test"]
[pandeiro/boot-http "0.7.6" :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.9.293"]
[crisptrutski/boot-cljs-test "0.3.0" :scope "test"]
[reagent "0.6.0"]
[binaryage/devtools "0.9.0" :scope "test"]
[binaryage/dirac "1.1.3" :scope "test"]
[powerlaces/boot-cljs-devtools "0.2.0" :scope "test"]
[clj3manchess/engine "0.3.0-SNAPSHOT"]
[clj3manchess/online-client "0.3.0-SNAPSHOT"]])
(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]]
'[powerlaces.boot-cljs-devtools :refer [cljs-devtools dirac]])
(deftask build []
(comp (speak)
(cljs)
))
(deftask run []
(comp (serve)
(watch)
(cljs-repl)
(cljs-devtools)
(dirac)
(reload)
(build)))
(deftask production []
(task-options! cljs {:optimizations :advanced})
identity)
(deftask development []
(task-options! cljs {:optimizations :none}
reload {:on-jsload 'chess3man-web.app/init})
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)))