forked from compassus/compassus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.boot
139 lines (122 loc) · 4.78 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
(def +version+ "1.0.0-alpha3-SNAPSHOT")
(set-env!
:source-paths #{"src/main"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/clojure "1.9.0-alpha17" :scope "provided"]
[org.clojure/clojurescript "1.9.562" :scope "provided"
:classifier "aot"]
[org.clojure/clojurescript "1.9.562" :scope "provided"]
[org.omcljs/om "1.0.0-beta1" :scope "provided"]
[cljsjs/react-with-addons "15.5.4-0" :scope "test"]
[cljsjs/react-dom "15.5.4-0" :scope "test"]
[com.cognitect/transit-clj "0.8.300" :scope "test"]
[org.clojure/core.async "0.3.443" :scope "test"]
[devcards "0.2.3" :scope "test"]
[com.cemerick/piggieback "0.2.1" :scope "test"]
[pandeiro/boot-http "0.8.3" :scope "test"]
[adzerk/boot-cljs "2.0.0" :scope "test"]
[adzerk/boot-cljs-repl "0.3.3" :scope "test"]
[adzerk/boot-test "1.2.0" :scope "test"]
[crisptrutski/boot-cljs-test "0.3.0" :scope "test"]
[doo "0.1.7" :scope "test"]
[adzerk/boot-reload "0.5.1" :scope "test"]
[adzerk/bootlaces "0.1.13" :scope "test"]
[org.clojure/tools.nrepl "0.2.13" :scope "test"]
[org.clojure/tools.namespace "0.3.0-alpha4" :scope "test"]
[weasel "0.7.0" :scope "test"]
[boot-codox "0.10.3" :scope "test"]]
:exclusions '[org.clojure/clojure org.clojure/clojurescript
cljsjs/react cljsjs/react-dom])
(require
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :as cr :refer [cljs-repl start-repl]]
'[adzerk.boot-reload :refer [reload]]
'[adzerk.boot-test :as bt-clj]
'[adzerk.bootlaces :refer [bootlaces! push-release push-snapshot]]
'[clojure.tools.namespace.repl :as repl]
'[crisptrutski.boot-cljs-test :as bt-cljs]
'[pandeiro.boot-http :refer [serve]]
'[codox.boot :refer [codox]])
(bootlaces! +version+ :dont-modify-paths? true)
(task-options!
pom {:project 'invetica/compassus
:version +version+
:description "A routing library for Om Next."
:url "https://github.com/compassus/compassus"
:scm {:url "https://github.com/compassus/compassus"}
:license {"name" "Eclipse Public License"
"url" "http://www.eclipse.org/legal/epl-v10.html"}})
(deftask build-jar []
(set-env! :resource-paths #{"src/main"})
(adzerk.bootlaces/build-jar))
(deftask release-clojars! []
(comp
(build-jar)
(push-release)))
(deftask deps [])
(deftask devcards []
(set-env! :source-paths #(conj % "src/devcards"))
(comp
(serve)
(watch)
(cljs-repl)
(reload)
(speak)
(cljs :source-map true
:compiler-options {:devcards true
:parallel-build true}
:ids #{"js/devcards"})
(target)))
(deftask testing []
(set-env! :source-paths #(conj % "src/test"))
identity)
(deftask test-clj []
(comp
(testing)
(bt-clj/test)))
(deftask test-cljs
[e exit? bool "Enable flag."]
(let [exit? (cond-> exit?
(nil? exit?) not)]
(comp
(testing)
(bt-cljs/test-cljs
:js-env :node
:namespaces #{'compassus.tests}
:cljs-opts {:parallel-build true}
:exit? exit?))))
(ns-unmap 'boot.user 'test)
(deftask test []
(comp
(test-clj)
(test-cljs)))
(deftask auto-test []
(comp
(watch)
(speak)
(test-cljs :exit? false)))
(deftask doc []
(comp
(codox :name "Compassus"
:version +version+
:description "A routing library for Om Next."
:output-path (str "doc/" +version+)
:source-uri (str "https://github.com/compassus/compassus/tree/" +version+ "/{filepath}#L{line}")
:exclude-vars #"^(map)?->\p{Upper}|ui_")))
(deftask release-devcards []
(set-env! :source-paths #(conj % "src/devcards"))
(cljs :optimizations :advanced
:ids #{"js/devcards"}
:compiler-options {:devcards true
:elide-asserts true
:parallel-build true
:verbose true
:compiler-stats true
:closure-defines {'goog/DEBUG false}}))
(deftask release-gh-pages []
(comp
(doc)
(release-devcards)
(sift :move {#"^index.html" "devcards/index.html"
#"^js/" "devcards/js/"})
(target)))