-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.boot
79 lines (64 loc) · 2.5 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
(def project 'manifold-cljs)
(def version "0.1.7-2-SNAPSHOT")
(set-env! :resource-paths #{"src" "vendor"}
:dependencies '[[org.clojure/clojure "1.9.0" :scope "provided"]
[org.clojure/clojurescript "1.10.238" :scope "provided"]
[adzerk/boot-cljs "2.1.4" :scope "test"
:exclusions [org.clojure/clojurescript]]
[adzerk/boot-test "1.2.0" :scope "test"]
[crisptrutski/boot-cljs-test "0.3.4" :scope "test"]
[adzerk/bootlaces "0.1.13" :scope "test"]
[adzerk/boot-reload "0.5.2" :scope "test"]
[pandeiro/boot-http "0.8.3" :scope "test"]])
(require '[adzerk.boot-cljs :refer [cljs]]
'[adzerk.bootlaces :as l :refer [push-release]]
'[crisptrutski.boot-cljs-test :refer [test-cljs]])
(task-options!
pom {:project project
:version version
:description "Manifold implementation in Clojurescript"
:url "https://github.com/dm3/manifold-cljs"
:scm {:url "https://github.com/dm3/manifold-cljs"}
:license {"MIT License" "https://opensource.org/licenses/MIT"}}
test-cljs {:cljs-opts {:process-shim false}})
(l/bootlaces! version :dont-modify-paths? true)
(deftask build-jar []
(comp (pom) (jar) (install)))
(deftask release []
(comp (build-jar) (push-release)))
(defn dev! []
(task-options! cljs {:optimizations :none, :source-map true}))
(deftask dev []
(dev!)
(comp (watch)
(cljs)))
(deftask test [j js-env VAL kw "JS environment (node/phantomjs/karma/...)"]
(merge-env! :resource-paths #{"test"})
(dev!)
(test-cljs :js-env (or js-env :phantom)))
(deftask test-all []
(comp
(test :js-env :phantom)
(test :js-env :node)))
(deftask autotest [j js-env VAL kw "JS environment (node/phantomjs/karma/...)"]
(merge-env! :resource-paths #{"test"})
(dev!)
(comp (watch)
(test-cljs :js-env (or js-env :phantom))))
(deftask repl-dev []
(merge-env! :resource-paths #{"test"})
(dev!)
(repl))
;; examples
(require '[pandeiro.boot-http :as http]
'[adzerk.boot-reload :refer [reload]])
(deftask examples []
(dev!)
(set-env! :resource-paths #{"examples/src"})
(merge-env! :dependencies `[[~project ~version]
[org.clojure/core.async "0.4.474"]])
(comp
(http/serve :httpkit true, :port 3000)
(watch)
(reload)
(cljs)))