-
Notifications
You must be signed in to change notification settings - Fork 0
/
shadow-cljs.edn
35 lines (35 loc) · 1.95 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
{:deps true
;; We have to use SSL for the Shadow CLJS server because otherwise web
;; browsers will complain if an HTTPS page (which is required in order
;; to access the microphone and camera) makes a connection to a non-SSL
;; WebSocket address.
:ssl {:keystore "certs/dev-keystore.jks"
:password "password"}
:builds {:client {:target :browser
:asset-path "/js"
:modules {:app {:init-fn shut-the-box.client.core/init!}}
:devtools {:watch-dir "resources/public"
:after-load shut-the-box.client.core/mount-root}
:dev {:output-dir "target/dev/public/js"}
:release {:output-dir "target/release/public/js"
:closure-defines {"goog.DEBUG" false}}}
:server {:target :node-script
:main shut-the-box.server.core/-main
;; Must set optimizations to simple, otherwise Shadow
;; CLJS will use advanced, which fails spectacularly
;; on Node.js.
:compiler-options {:optimizations :simple}
;; autoload must be true for Node.js, otherwise
;; Shadow CLJS will not auto-reload files!
;; You have to specify the devtools-url, otherwise
;; Shadow CLJS's (Node.js) REPL will try to connect
;; to "localhost" which then fails because the domain
;; name doesn't match what is in the SSL certificate.
:devtools {:autoload true
:devtools-url "https://devbox.example.com:9630"}
:dev {:output-to "server.js"}
:release {:output-to "target/release/server.js"}}
:test {:target :node-test
:output-to "target/test/node-test.js"
:autorun true
:devtools {:preloads [pjstadig.humane-test-output]}}}}