-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproject.clj
233 lines (221 loc) · 12.3 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
(defproject cube-test "0.1.0-SNAPSHOT"
:dependencies [
; [org.clojure/clojure "1.10.1"]
[org.clojure/clojure "1.10.3"]
; [org.clojure/clojure "1.11.1"]
; [org.clojure/clojurescript "1.10.764"]
[org.clojure/clojurescript "1.10.879"
; [org.clojure/clojurescript "1.11.60"
:exclusions [
; com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.clojure/google-closure-library-third-party]]
; [thheller/shadow-cljs "2.9.3"]
; [thheller/shadow-cljs "2.11.7"]
; [thheller/shadow-cljs "2.11.20"]
[thheller/shadow-cljs "2.15.2"]
; [reagent "0.10.0"]
; [reagent "1.1.0"]
[reagent "1.1.1"]
; [re-frame "0.12.0"]
[re-frame "1.2.0"]
[funcool/promesa "5.1.0"]
;;vt add
[cljstache "2.0.6"]
; [net.sekao/odoyle-rules "0.8.0"]
[net.sekao/odoyle-rules "1.0.0"]
[cljs-ajax "0.8.3"]
[day8.re-frame/http-fx "0.2.3"]
; [org.clojure/math.numeric-tower "0.0.4"]]
; [org.clojure/data.json "2.4.0"]]
;;vt end
; [proto-repl "1.4.24"]
;; Note: proto-repl .jar has a different version than proto-repl the atom plugin
;; so use "0.3.1" not "1.4.24"
;; Note: need to add to ":profiles" so it's picked up by ":shadow-cljs"
;; and subsequently put into (auto-generated)"shadow-cljs.edn"
; [proto-repl "0.3.1"]]
;; vt add for string interpolation
;; nope: only works for clj
; [org.clojure/core.incubator "0.1.4"]]
;; attempt to add web workers support
[jtk-dvlp/cljs-workers "1.1.2"]
[jtk-dvlp/re-frame-worker-fx "1.0.3"]]
:plugins [
; [lein-shadow "0.2.0"]
[lein-shadow "0.3.1"]
[lein-shell "0.5.0"]
;;vt add
; [lein-npm "0.6.2"]]
[lein-pdo "0.1.1"]]
;;vt end
:min-lein-version "2.9.0"
;;vt add
; :npm {:dependencies [[json-server "0.17.0"]]}
;;vt end
;;:source-paths ["src/clj" "src/cljs"]
; :source-paths ["src/clj" "src/cljs" "src/cljc" "src/test" "test2" "test"]
:source-paths ["src/clj" "src/cljs" "src/cljc" "src/test" "test2" "test"
"workers/worker_frig_frog/src/cljs" "workers/worker_frig_frog/src/cljc"]
;;vt add for re-frame-10x
:compiler {
:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}
:preloads [day8.re-frame-10x.preload]
:main "re-con.core"}
;;vt end
:clean-targets ^{:protect false} ["resources/public/js/compiled" "target"]
:shell {:commands {"open" {:windows ["cmd" "/c" "start"]
:macosx "open"
:linux "xdg-open"}}}
:shadow-cljs {:nrepl {:port 8778}
;;vt add
;; update 2020-02-04
;; this works in that it creates 'https://localhost:8281/', and thus creates
;; a navigator.xr in the browser. However, xr-mode in firefox and chrome still
;; doesn't work.
;; Note: if using the oculus quest, the two browsers on there require https in order to enter vr mode
:ssl {:keystore "dev_artifacts/ssl/keystore2.jks"
:password "shadow-cljs"}
;;vt end
:builds {:app {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "/js/compiled"
:modules {:app {:init-fn cube-test.core/init
:preloads [
devtools.preload
;;vt add
day8.re-frame-10x.preload]}}
;;vt add
; :js-options {:ignore-asset-requires true}
;;vt end
:karma-test {:compiler-options {
:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}
:optimizations :none}}
;;vt add
:dev {:compiler-options {
:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}
;;vt add
;; don't optimize fn names so we can use cljs as native js cb handlers
; :output-feature-set :es6}}
; :output-feature-set :es2018
:output-feature-set :es2020
; :optimizations :simple
:optimizations :none
:preloads [day8.re-frame-10x.preload]}}
;;vt end
:devtools {:http-root "resources/public"
:http-port 8281}}
;;vt add
:karma-test {
:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "/js/compiled"
:modules {:app {:init-fn cube-test.core/init
:preloads [
devtools.preload
day8.re-frame-10x.preload]}}
:karma-test {:compiler-options {
:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}
:optimizations :none}}
:dev {:compiler-options {
:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}
:optimizations :none}}
:devtools {:http-root "resources/public"
:http-port 8281}}
;;vt end
;;vt add
:worker-frig-frog {
:target :browser
:output-dir "resources/public/libs/worker_frig_frog"
; :js-options {:js-provider :require}
:asset-path "/js/compiled_vt"
:modules {:app {:init-fn worker-frig-frog.core/init
:preload [devtools.preload
day8.re-frame-10x.preload]}}}
:ff-worker {
:target :browser
:output-dir "resources/public/libs/workers/ff-worker"
; :js-options {:js-provider :require}
:asset-path "/js/compiled_vt"
;; Note: the ":ff-worker" under modules is what determines the output
;; file name of "ff-worker.cljs"
:modules {:ff-worker {:init-fn worker-frig-frog.core/init
:preload [devtools.preload
day8.re-frame-10x.preload]}}}}}
;;vt end
:aliases {"dev" ["with-profile" "dev" "do"
["shadow" "watch" "app"]]
;; vt add watch from a more modern project
"watch" ["with-profile" "dev" "do"
["shadow" "watch" "app" "browser-test" "karma-test"]]
; ["shadow" "watch" "app" "browser-test" "karma-test" "worker-frig-frog"]]
"prod" ["with-profile" "prod" "do"
["shadow" "release" "app"]]
"build-report" ["with-profile" "prod" "do"
["shadow" "run" "shadow.cljs.build-report" "app" "target/build-report.html"]
["shell" "open" "target/build-report.html"]]
"karma" ["with-profile" "prod" "do"
["shadow" "compile" "karma-test"]
["shell" "karma" "start" "--single-run" "--reporters" "junit,dots"]]
;;vt add
"karma-test" ["with-profile" "dev" "do"
["shadow" "compile" "karma-test"]
["shell" "karma" "start" "--single-run" "--reporters" "junit,dots"]]
;;vt end
;;vt-add
; "fig:build" ["run" "-m" "figwheel.main" "-b" "devfw" "-r"]
; "devfw" ["run" "-m" "figwheel.main" "-b" "devfw" "-r"]
; run with: lein.bat trampoline devfw
; update: run with: lein.bat devfw since we added "trampoline" before "run" below
;;vt-add
"worker-frig-frog" ["with-profile" "worker-frig-frog" "do"
; ["shadow" "release" "app"]
["shadow" "release" "worker-frig-frog"]]
"worker-frig-frog-dev" ["with-profile" "worker-frig-frog" "do"
["shadow" "watch" "worker-frig-frog"]]
; "watch" ["pdo" ["less" "auto"]
; ["minify-assets" "watch"]]}
;;vt end
"devfw" ["with-profile" "devfw" "do"
; ["run" "-m" "figwheel.main" "-b" "devfw" "-r"]
["trampoline" "run" "-m" "figwheel.main" "-b" "devfw" "-r"]]}
; ["trampoline" "-m" "figwheel.main" "-b" "devfw" "-r"]]}
:profiles
{:dev
{:dependencies [
[binaryage/devtools "1.0.3"]
;;vt add
[day8.re-frame/tracing "0.6.2"]
[day8.re-frame/re-frame-10x "1.2.2"]]
; [day8.re-frame/re-frame-10x "1.0.2"]]
; [day8.re-frame/re-frame-10x "0.7.0"]]
; [day8.re-frame/re-frame-10x "0.4.7"]]
; [day8.re-frame/tracing "0.5.3"]]
; [proto-repl/proto-repl "0.3.1"]]
;;vt end
:source-paths ["dev"]}
;; vt add for re-frame-10x
; [day8.re-frame/re-frame-10x "0.7.0"]
; [day8.re-frame/tracing "0.5.3"]}
;;vt end
;;vt add
:devfw
{:dependencies [[com.bhauman/figwheel-main "0.2.12"]
[com.bhauman/rebel-readline-cljs "0.1.4"]
[reagent "0.10.0"]
[re-frame "1.2.0"]]
:resource-paths ["target"]
:source-paths ["src"]
;; need to add the compiled assets to the :clean-targets
:clean-targets ^{:protect false} ["target"]}
;; vt-end
;;vt add
:worker-frig-frog
{:dependencies [
[binaryage/devtools "1.0.3"]
[day8.re-frame/tracing "0.6.2"]
[day8.re-frame/re-frame-10x "1.2.2"]]
:source-paths ["workers/worker_frig_frog/"]}
;; vt-end
:prod {}}
:prep-tasks [])