-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.boot
72 lines (65 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
(set-env!
:source-paths #{"src/cljs" "src/cljx" "src/less"}
:resource-paths #{"src/clj"}
:dependencies '[[adzerk/boot-cljs "0.0-2814-3" :scope "test"]
[adzerk/boot-cljs-repl "0.1.9" :scope "test"]
[adzerk/boot-reload "0.2.4" :scope "test"]
[deraen/boot-cljx "0.2.2" :scope "test"]
[deraen/boot-less "0.2.1" :scope "test"]
; Backend
[org.clojure/clojure "1.6.0"]
[http-kit "2.1.19"]
[org.clojure/tools.namespace "0.2.9"]
[metosin/ring-http-response "0.5.2"]
[ring "1.3.2"]
[compojure "1.3.2"]
[hiccup "1.0.5"]
; Frontend
[org.omcljs/om "0.8.8"]
[prismatic/om-tools "0.3.10"]
[org.clojure/clojurescript "0.0-2816"]
[sablono "0.3.4"]
[org.webjars/bootstrap "3.3.2"]])
(require
'[adzerk.boot-cljs :refer :all]
'[adzerk.boot-cljs-repl :refer :all]
'[adzerk.boot-reload :refer :all]
'[deraen.boot-cljx :refer :all]
'[deraen.boot-less :refer :all]
'[saapas.boot :refer :all])
(task-options!
pom {:project 'saapas
:version "0.1.0"
:description "Application template for Cljs/Om with live reloading, using Boot."
:license {"The MIT License (MIT)" "http://opensource.org/licenses/mit-license.php"}}
aot {:namespace #{'saapas.main}}
jar {:main 'saapas.main}
cljs {:source-map true}
less {:source-map true})
(deftask dev
"Start the dev env..."
[s speak bool "Notify when build is done"
r clj-reload bool "Use r.m.reload to reload changed clj namespaces on each request"
p port PORT int "Port for web server"]
(comp
(watch)
; Should be before cljs so the generated code is picked up
(reload :on-jsload 'saapas.core/start!)
(less)
(cljx)
; This starts a normal repls with piggieback middleware
(cljs-repl)
(cljs :optimizations :none :unified-mode true)
(if speak (boot.task.built-in/speak) identity)
(start-app :port port :reload clj-reload)))
(deftask package
"Build the package"
[]
(comp
(less :compression true)
(cljx)
(cljs :optimizations :advanced)
(aot)
(pom)
(uber)
(jar)))