-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.boot
64 lines (58 loc) · 2.03 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
(set-env!
:target-path "target"
:resource-paths #{"resources"}
:source-paths #{"src/clj" "src/cljs" "../boot-cljs/src"}
:dependencies '[;[adzerk/boot-cljs "0.0-2629-9"]
[adzerk/boot-cljs-repl "0.1.8"]
[adzerk/boot-reload "0.2.4"]
[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2727"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[org.omcljs/om "0.8.6"]
[sablono "0.3.1"]
[org.clojars.leanpixel/cljs-uuid-utils "1.0.0-SNAPSHOT"]
[com.andrewmcveigh/cljs-time "0.3.0"]
[ring "1.3.1"]
[compojure "1.2.1"]
[http-kit "2.1.19"]])
(require
'[adzerk.boot-cljs :refer :all]
'[adzerk.boot-reload :refer :all]
'[adzerk.boot-cljs-repl :refer :all]
'[lokate.server :as server]
'[ring.middleware.reload :as reload]
'[ring.middleware.file :as file]
'[ring.middleware.file-info :as file-info])
(defn dev-handler []
(-> server/handler (reload/wrap-reload)
(file/wrap-file "target/public")
(file-info/wrap-file-info)))
(deftask dev-cljs
"Build cljs for development."
[]
(comp (watch)
(speak)
(reload :on-jsload (symbol "lokate.app/go!"))
(cljs :source-map true
:optimizations :none
:output-to "public/js/main.js")))
(deftask dev-serve
"Start server for development."
[]
(with-post-wrap fileset (server/run (dev-handler))))
(deftask dev
"Build cljs and start server for development."
[]
(comp
(dev-cljs)
(dev-serve)))
(deftask prod
"Build application uberjar with http-kit main."
[]
(comp (cljs :unified true
:source-map true
:optimizations :none
:output-to "public/js/main.js")
(aot :all true)
(uber)
(jar :file "lokate.jar" :main 'lokate.server)))