-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.boot
88 lines (69 loc) · 2.37 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
81
82
83
84
85
86
87
88
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[adzerk/boot-cljs-repl "0.3.3" :scope "test"]
[adzerk/boot-cljs "2.1.4" :scope "test"]
[adzerk/boot-reload "0.5.2" :scope "test"]
[com.cemerick/piggieback "0.2.2" :scope "test"]
[weasel "0.7.0" :scope "test"]
[pandeiro/boot-http "0.8.3"]
[org.clojure/tools.nrepl "0.2.13"]
[cider/cider-nrepl "0.15.1"]
[org.clojure/test.check "0.10.0-alpha2"]
[amalloy/ring-buffer "1.2.1"]
[thi.ng/geom "1.0.0-RC3" #_"0.0.1178-SNAPSHOT"]
[prismatic/dommy "1.1.0"]
[com.taoensso/timbre "4.10.0"]])
(require
'[pandeiro.boot-http :refer [serve]]
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
'[adzerk.boot-reload :refer [reload]])
(task-options! cljs {:compiler-options
{:output-to "js/art.js"
:output-dir "js/out"
:asset-path "js/out"
:parallel-build true
:main 'art.core
;;:pseudo-names true
:externs ["externs.js"]}})
(deftask dev
[]
(task-options! cljs {:optimizations :none
:source-map true}
cljs-repl {:nrepl-opts {:port 3311}}
reload {:on-jsload 'art.core/main})
(comp
(cider)
(serve :dir "target"
:reload true
:httpkit true
:port 5000)
(watch)
(reload)
(cljs-repl)
(cljs)
#_(repl :server true
:port 3311)
(target :dir #{"target"})))
(deftask prod-js
[]
(task-options! cljs {:optimizations :advanced})
(comp
(cljs)
(sift :include #{#"js/.*js$"
#"index.html$"
#"css/.*css$"
#"svg/.*svg$"
#"fonts/.*"})
(target :dir #{"release-js"})))
(deftask prod-jar
[]
(comp
(aot :namespace #{'art.core})
(uber)
(jar :file "art.jar" :main 'art.core)
(sift :include #{#"art.jar"})
(target :dir #{"release-jar"})))