-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.boot
84 lines (73 loc) · 2.52 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
#!/usr/bin/env boot
(set-env!
:source-paths #{}
:resource-paths #{"html" "less" "resources" "src"}
:dependencies '[; Boot setup
[adzerk/boot-cljs "1.7.170-1"]
[adzerk/boot-cljs-repl "0.3.0"]
[adzerk/boot-reload "0.4.1"]
[deraen/boot-less "0.4.2"]
; boot-cljs-repl dependencies
[com.cemerick/piggieback "0.2.1"]
[weasel "0.7.0"]
[org.clojure/tools.nrepl "0.2.12"]
; Server dependencies
[clj-consonant "0.1.0-SNAPSHOT"]
[com.cognitect/transit-clj "0.8.285"]
[compojure "1.4.0"]
[http-kit "2.1.19"]
[org.clojure/tools.reader "1.0.0-alpha1"]
[org.danielsz/system "0.1.9"]
[ring-middleware-format "0.6.0"]
; App dependencies
[cljsjs/highlight "8.4-0"]
[com.cognitect/transit-cljs "0.8.232"]
[org.clojure/clojurescript "1.7.170"]
[org.omcljs/om "1.0.0-alpha22-SNAPSHOT"]
; Other dependencies
[devcards "0.2.0-8"]])
(task-options!
pom {:project 'copaste
:version "0.1.0-SNAPSHOT"})
(require '[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
'[adzerk.boot-reload :refer [reload]]
'[deraen.boot-less :refer [less]]
'[reloaded.repl :refer [init start stop go reset]]
'[system.boot :refer [system run]]
'[server.systems :refer [development-system production-system]])
(deftask build-development
[]
(comp
(less)
(sift :add-jar {'cljsjs/highlight #"^cljsjs/common/highlight/github.min.css"})
(cljs :source-map true
:optimizations :none
:compiler-options {:devcards true})))
(deftask run-development
[]
(comp
(watch)
(system :sys #'development-system
:auto-start true
:hot-reload true
:files ["handler.clj"])
(reload :on-jsload 'app.app/run)
(cljs-repl)
(build-development)
(repl :server true)))
(deftask build-production
[]
(comp
(less :compression true)
(cljs :optimizations :advanced
:compiler-options {:devcards true})))
(deftask run-production
[]
(comp
(watch)
(reload :on-jsload 'app.app/run)
(cljs-repl)
(build-production)
(run :main-namespace "server.core" :arguments [#'production-system])
(wait)))