-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.boot
More file actions
executable file
·56 lines (46 loc) · 1.49 KB
/
build.boot
File metadata and controls
executable file
·56 lines (46 loc) · 1.49 KB
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
(set-env!
:source-paths #{"src"}
:resource-paths #{"resources"}
:dependencies '[[crisptrutski/boot-cljs-test "0.3.5-SNAPSHOT"]
[adzerk/boot-cljs "2.1.4" :scope "test"]
[adzerk/boot-reload "0.5.2" :scope "test"]
[pandeiro/boot-http "0.8.3" :scope "test"
:exclusions [org.clojure/clojure]]
[nightlight "2.0.4"]
[org.clojure/clojurescript "1.9.946"]
[reagent "0.7.0"]])
(require
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-reload :refer [reload]]
'[pandeiro.boot-http :refer [serve]]
'[nightlight.boot :refer [nightlight sandbox]]
'[crisptrutski.boot-cljs-test :refer [test-cljs]])
(deftask dev []
(comp
(watch)
(reload)
(sandbox :file "java.policy")
(cljs :source-map true :optimizations :none)
(target)))
(deftask run []
(comp
(serve :port 3000)
(dev)
(nightlight :port 4000 :url "http://localhost:3000")))
(deftask build []
(comp (cljs :optimizations :advanced) (target)))
(deftask testing []
(set-env! :source-paths #(conj % "test/cljs"))
identity)
;;; This prevents a name collision WARNING between the test task and
;;; clojure.core/test, a function that nobody really uses or cares
;;; about.
(ns-unmap 'boot.user 'test)
(deftask test []
(comp (testing)
(test-cljs :js-env :phantom
:exit? true)))
(deftask auto-test []
(comp (testing)
(watch)
(test-cljs :js-env :phantom)))