-
-
Notifications
You must be signed in to change notification settings - Fork 399
/
shadow-cljs.edn
68 lines (65 loc) · 4.77 KB
/
shadow-cljs.edn
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
{:deps {:aliases [:shadow-cljs]}
;; Don't install npm-deps declared in dependencies.
;; If we need them, we install them manually.
;; https://github.com/thheller/shadow-cljs/issues/800#issuecomment-725716087
:npm-deps {:install false}
:nrepl {:port 8777}
:builds {
;; pure browser https://athensresearch.github.io/athens
:app {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "js/compiled"
:modules {:app {:init-fn athens.core/init}}
;; Don't try to polyfill for generators, we don't try to support older browsers
;; and it breaks some libraries we use (ForceGraph2D) when other imports change.
;; https://github.com/thheller/shadow-cljs/issues/854
:js-options {:babel-preset-config {:targets {:chrome 80}}}
:compiler-options {:closure-warnings {:global-this :off}
:infer-externs :auto
:closure-defines {re-frame.trace.trace-enabled? true}
:output-feature-set :es-next
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}
:dev {:compiler-options {:closure-defines {re-frame.trace.trace-enabled? true
day8.re-frame.tracing.trace-enabled? true}
;; Hide redef warnings, we started having around 5 that show up
;; on every rebuild due to clojure 1.11 adding new fns.
:warnings {:redef false}}}
:release {:build-options {:ns-aliases {day8.re-frame.tracing day8.re-frame.tracing-stubs}}}
:devtools {:preloads [devtools.preload
day8.re-frame-10x.preload]
:http-root "resources/public"
:http-port 3000}}
;; frontend for electron
:renderer {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "js/compiled"
:modules {:renderer {:init-fn athens.core/init}}
:js-options {:babel-preset-config {:targets {:chrome 80}}}
:compiler-options {:closure-warnings {:global-this :off}
:infer-externs :auto
:closure-defines {re-frame.trace.trace-enabled? true}
:output-feature-set :es-next
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}
;; see https://shadow-cljs.github.io/docs/UsersGuide.html#_conditional_reading
:reader-features #{:electron}}
:dev {:compiler-options {:closure-defines {re-frame.trace.trace-enabled? true
day8.re-frame.tracing.trace-enabled? true
;; To enable re-frame-10x set debug to `true`
goog.DEBUG false}
:warnings {:redef false}}}
:release {:build-options {:ns-aliases {day8.re-frame.tracing day8.re-frame.tracing-stubs}}
:compiler-options {:source-map true
:pseudo-names true}}
:devtools {:preloads [devtools.preload
;; To enable re-frame-10x uncomment below preload
#_day8.re-frame-10x.preload]}}
;; backend for electron (node.js)
:main {:target :node-script
:output-to "resources/main.js"
:main athens.main.core/main
:js-options {:babel-preset-config {:targets {:chrome 80}}}
:compiler-options {:output-feature-set :es-next
:reader-features #{:electron}}}
:karma-test {:target :karma
:ns-regexp "-test$"
:output-to "target/karma-test.js"}}}