This repository was archived by the owner on Jun 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.boot
94 lines (89 loc) · 3.9 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
(def project
{:name "see package.json"
:version "see package.json"})
(set-env! :source-paths #{"src"}
:resource-paths #{"resources"}
:dependencies
'[[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[org.clojure/tools.nrepl "0.2.13" :scope "test"]
[org.clojure/tools.namespace "0.3.0-alpha1" :scope "test"]
[org.clojure/test.check "0.9.0" :scope "test"]
[com.cemerick/piggieback "0.2.2" :scope "test"]
[weasel "0.7.0" :scope "test"]
[adzerk/boot-cljs "2.1.4" :scope "test"]
[adzerk/boot-cljs-repl "0.3.3" :scope "test"]
[adzerk/boot-reload "0.5.2" :scope "test"]
[boot-deps "0.1.9" :scope "test"]
[boot-fmt/boot-fmt "0.1.8" :scope "test"]
[powerlaces/boot-figreload "0.5.14" :scope "test"]
[binaryage/devtools "0.9.9" :scope "test"]
[binaryage/dirac "1.2.29" :scope "test"]
[powerlaces/boot-cljs-devtools "0.2.0" :scope "test"]
[tolitius/boot-check "0.1.6" :scope "test"]
;
[cljs-http "0.1.44"]
[compact-uuids "0.2.0"]
[mount "0.1.12"]
[com.andrewmcveigh/cljs-time "0.5.2"]
[reagent "0.8.0-alpha2" :exclusions [cljsjs.react]]
[adzerk/env "0.4.0"]
[cljsjs/react-select "1.0.0-rc.10-1"]
[cljsjs/react "16.0.0-0"]
[cljsjs/react-dom "16.0.0-0"]
[cljsjs/moment "2.10.6-0"]
[cljsjs/react-virtualized "9.18.5-1" :exclusions [cljsjs.react]]
[cljsjs/react-motion "0.5.0-0"]
[cljsjs/dygraph "2.1.0-0"]
[cljsjs/raven "3.22.1-0"]])
(require '[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
'[powerlaces.boot-figreload :refer [reload]]
'[powerlaces.boot-cljs-devtools :refer [cljs-devtools dirac]]
'[tolitius.boot-check :as check]
'[boot-fmt.core :refer [fmt]]
'[boot.git :refer [last-commit]])
(deftask prod-build
[]
(comp (cljs :ids #{"main"}
:compiler-options {:closure-defines {'app.main/dev? false}}
:optimizations :simple)
(cljs :ids #{"renderer"}
:compiler-options {:closure-defines {'app.config/commit (last-commit)}}
:optimizations :simple)
(target)))
(deftask check-sources
[]
(set-env! :source-paths #{"src"})
(comp (check/with-yagni)
(check/with-eastwood)
(check/with-kibit)
(check/with-bikeshed)))
(deftask
dev-build
[]
(set-env! :source-paths #(conj % "dev"))
(comp (speak :theme "ordinance")
(cljs-devtools)
(dirac)
(cljs-repl :ids #{"renderer"})
(reload :ids #{"renderer"} :ws-host "localhost" :target-path "target")
(cljs :ids #{"renderer" "mount"}
:compiler-options {:parallel-build true}
:closure-defines {'app.renderer/dev? true})
;; path.resolve(".") which is used in CLJS's node shim
;; returns the directory `electron` was invoked in and
;; not the directory our main.js file is in.
;; Because of this we need to override the compilers `:asset-path
;; option`
;; See http://dev.clojure.org/jira/browse/CLJS-1444 for details.
(cljs :ids #{"main"}
:compiler-options {:asset-path "target/main.out"
:closure-defines {'app.main/dev? true}
:parallel-build true
:external-config
{:devtools/config
{:features-to-install [:formatters :hints]
:fn-symbol "λ"
:print-config-overrides true}}})
(target)))