forked from reagent-project/reagent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.clj
200 lines (179 loc) · 7.72 KB
/
project.clj
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
(defproject com.roomkey/reagent :lein-v
:url "http://github.com/reagent-project/reagent"
:license {:name "MIT"}
:description "A simple ClojureScript interface to React"
:repositories {"rk-maven" {:url "s3p://rk-maven/releases/" :no-auth true}}
:dependencies [[org.clojure/clojure "1.10.1"]
;; If :npm-deps enabled, these are used only for externs.
;; Without direct react dependency, other packages,
;; like react-leaflet might have closer dependency to a other version.
[cljsjs/react "16.13.0-0"]
[cljsjs/react-dom "16.13.0-0"]
[cljsjs/react-dom-server "16.13.0-0"]]
:plugins [[lein-cljsbuild "1.1.7"]
[lein-doo "0.1.11"]
[lein-codox "0.10.7"]
[lein-figwheel "0.5.19"]
[com.roomkey/lein-v "7.0.0"]]
:middleware [lein-v.plugin/middleware]
:source-paths ["src"]
:codox {:language :clojurescript
:exclude clojure.string
:source-paths ["src"]
:doc-paths []}
:profiles {:dev {:dependencies [[org.clojure/clojurescript "1.10.597"]
[figwheel "0.5.19"]
[doo "0.1.11"]
[cljsjs/prop-types "15.7.2-0"]]
:source-paths ["demo" "test" "examples/todomvc/src" "examples/simple/src" "examples/geometry/src"]
:resource-paths ["site" "target/cljsbuild/client" "target/cljsbuild/client-npm"]}}
:clean-targets ^{:protect false} [:target-path :compile-path "out"]
:figwheel {:http-server-root "public" ;; assumes "resources"
:css-dirs ["site/public/css"]
:repl false}
;; No profiles and merging - just manual configuration for each build type.
;; For :optimization :none ClojureScript compiler will compile all
;; cljs files in source-paths. To ensure unncessary files
;; aren't compiled it would be better to not provide source-paths or
;; provide single file but currently this doesn't work for Cljsbuild.
;; In future :main alone should be enough to find entry file.
:cljsbuild
{:builds
[{:id "client"
:source-paths ["demo"]
:watch-paths ["src" "demo" "test"]
:figwheel true
:compiler {:parallel-build true
:optimizations :none
:main "reagentdemo.dev"
:output-dir "target/cljsbuild/client/public/js/out"
:output-to "target/cljsbuild/client/public/js/main.js"
:npm-deps false
:asset-path "js/out"
:checked-arrays :warn
:infer-externs true}}
{:id "client-npm"
:source-paths ["demo"]
:watch-paths ["src" "demo" "test"]
:figwheel true
:compiler {:parallel-build true
:optimizations :none
:main "reagentdemo.dev"
:output-dir "target/cljsbuild/client-npm/public/js/out"
:output-to "target/cljsbuild/client-npm/public/js/main.js"
:npm-deps true
:asset-path "js/out"
:checked-arrays :warn}}
{:id "test"
:source-paths ["test"]
:compiler {:parallel-build true
:optimizations :none
:main "reagenttest.runtests"
:asset-path "js/out"
:output-dir "target/cljsbuild/test/out"
:output-to "target/cljsbuild/test/main.js"
:npm-deps false
:aot-cache true
:checked-arrays :warn
:infer-externs true}}
{:id "test-npm"
:source-paths ["test"]
:compiler {:parallel-build true
:optimizations :none
:main "reagenttest.runtests"
:asset-path "js/out"
:output-dir "target/cljsbuild/test-npm/out"
:output-to "target/cljsbuild/test-npm/main.js"
:npm-deps true
:aot-cache true
:checked-arrays :warn}}
;; Separate source-path as this namespace uses Node built-in modules which
;; aren't available for other targets, and would break other builds.
{:id "prerender"
:source-paths ["prerender"]
:compiler {:main "sitetools.prerender"
:target :nodejs
:output-dir "target/cljsbuild/prerender/out"
:output-to "target/cljsbuild/prerender/main.js"
:npm-deps true
:aot-cache true}}
{:id "node-test"
:source-paths ["test/reagenttest/runtests.cljs"]
:watch-paths ["src" "test"]
:compiler {:main "reagenttest.runtests"
:target :nodejs
:parallel-build true
:optimizations :none
:output-dir "target/cljsbuild/node-test/out"
:output-to "target/cljsbuild/node-test/main.js"
:npm-deps false
:aot-cache true
:checked-arrays :warn}}
{:id "node-test-npm"
:source-paths ["test/reagenttest/runtests.cljs"]
:watch-paths ["src" "test"]
:compiler {:main "reagenttest.runtests"
:target :nodejs
:parallel-build true
:optimizations :none
:output-dir "target/cljsbuild/node-test-npm/out"
:output-to "target/cljsbuild/node-test-npm/main.js"
:npm-deps true
:aot-cache true
:checked-arrays :warn}}
;; With :advanched source-paths doesn't matter that much as
;; Cljs compiler will only read :main file.
{:id "prod"
:source-paths ["demo"]
:compiler {:main "reagentdemo.prod"
:optimizations :advanced
:elide-asserts true
:pretty-print false
;; :pseudo-names true
:stable-names true
:output-to "target/cljsbuild/prod/public/js/main.js"
:output-dir "target/cljsbuild/prod/out" ;; Outside of public, not published
:npm-deps false
:aot-cache true}}
{:id "prod-npm"
:source-paths ["demo"]
:compiler {:main "reagentdemo.prod"
:optimizations :advanced
:elide-asserts true
:pretty-print false
:stable-names true
:output-to "target/cljsbuild/prod-npm/public/js/main.js"
:output-dir "target/cljsbuild/prod-npm/out" ;; Outside of public, not published
:closure-warnings {:global-this :off}
:npm-deps true
:aot-cache true}}
{:id "prod-test"
:source-paths ["test"]
:compiler {:main "reagenttest.runtests"
:optimizations :advanced
:elide-asserts true
:pretty-print false
:output-to "target/cljsbuild/prod-test/main.js"
:output-dir "target/cljsbuild/prod-test/out"
:closure-warnings {:global-this :off}
:npm-deps false
:aot-cache true
:checked-arrays :warn}}
{:id "prod-test-npm"
:source-paths ["test"]
:compiler {:main "reagenttest.runtests"
:optimizations :advanced
:elide-asserts true
:pretty-print false
;; :pseudo-names true
:output-to "target/cljsbuild/prod-test-npm/main.js"
:output-dir "target/cljsbuild/prod-test-npm/out"
:closure-warnings {:global-this :off}
:npm-deps true
:aot-cache true
:checked-arrays :warn}}]}
:release-tasks [["vcs" "assert-committed"]
["v" "update"] ;; compute new version & tag it
["vcs" "push"]
["v" "abort-when-not-anchored"]
["deploy" "rk-maven"]])