forked from pink-gorilla/notebook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shadow-cljs.edn
130 lines (121 loc) · 10.2 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
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
{;; :lein true
:lein {:profile "+cljs"}
;; :dependencies []
;; :source-paths
#_["src" ; cljs-kernel-shadow
"test" ; unit tests for cljs-kernel-test
"env/dev" ; demo app
]
:nrepl {:port 8703}
:builds {; https://github.com/mhuebert/shadow-re-frame/blob/master/shadow-cljs.edn
;; :none optimized build we ship
:app-with-cljs-kernel {:target :browser
:dependencies
[[org.pinkgorilla/gorilla-ui "0.1.20"]]
:build-options {:ns-aliases {pinkgorilla.kernel.cljs pinkgorilla.kernel.shadowcljs
pinkgorilla.tenx.config pinkgorilla.tenx.off}}
:output-dir "target/cljsbuild/gorilla-repl-client/js/cljs"
:asset-path "./js/cljs"
:js-options {:minimize-require false ; module requires full name instead of index
;:js-package-dirs ["packages/babel-worker/node_modules"]
;:js-provider :require
}
:compiler-options {;; preferrably implicit by shadow-cljs compile/watch/release
;; Beware: releasing :none not supported by shadow
;; :optimizations :none
:optimizations :simple ; self-hosted cljs
:external-config {:gorilla/config {:with-cljs-kernel true
:10x false}}
:externs ["src/gorilla-repl-externs.js"]}
:modules {:gorilla {:entries [pinkgorilla.app]}}}
:app-without-cljs-kernel {:target :browser
:build-options {:ns-aliases {pinkgorilla.kernel.cljs pinkgorilla.kernel.mock
pinkgorilla.tenx.config pinkgorilla.tenx.off}}
:output-dir "target/cljsbuild/gorilla-repl-client/js/mock"
:asset-path "./js/mock"
:compiler-options {:external-config {:gorilla/config {:with-cljs-kernel false
:10x false}}
:externs ["src/gorilla-repl-externs.js"]}
:modules {:gorilla {:entries [pinkgorilla.app]}}}
:pinkie {:target :browser
:lein {:profile "+pinkie"}
;:source-paths ["src/pinkie"]
:dependencies [[org.pinkgorilla/gorilla-ui "0.1.20"] ; renderers
;[clj-time "0.15.2"] ; needed for notebook exploration ui
]
:output-dir "target/cljsbuild/gorilla-repl-client/js/pinkie"
;:asset-path "./js/mock"
:modules {:gorilla {:entries [pinkie.app]}}
:compiler-options {:optimizations :simple}
:build-options {:ns-aliases {pinkgorilla.kernel.cljs pinkgorilla.kernel.mock
pinkgorilla.tenx.config pinkgorilla.tenx.off}}}
;; Must not use dev profile stuff here! Again: We ship this build
;; :devtools {}
:ci {:target :karma
:output-to "target/ci.js"
:build-options {:ns-aliases {pinkgorilla.kernel.cljs pinkgorilla.kernel.mock
pinkgorilla.tenx.config pinkgorilla.tenx.off}}
:compiler-options {:external-config {:gorilla/config {:with-cljs-kernel false
:10x false}}
:externs ["src/gorilla-repl-externs.js"]}}
:browser-test {:target :browser-test
:test-dir "target/cljsbuild/gorilla-repl-client/js/test"
:build-options {:ns-aliases {pinkgorilla.kernel.cljs pinkgorilla.kernel.mock
pinkgorilla.tenx.config pinkgorilla.tenx.off}}
:compiler-options {:external-config {:gorilla/config {:with-cljs-kernel false
:10x false}}
:externs ["src/gorilla-repl-externs.js"]}
;; :ns-regexp "-spec$"
;;; :runner-ns tests.client-test-main
:devtools {:http-port 8021
:http-root "target/cljsbuild/gorilla-repl-client/js/test"}}
:cards {:target nubank.workspaces.shadow-cljs.target
:build-options {:ns-aliases {pinkgorilla.kernel.cljs pinkgorilla.kernel.mock
pinkgorilla.tenx.config pinkgorilla.tenx.off}}
:ns-regexp "-(test|cards)$"
:output-name "target/cljsbuild/gorilla-repl-client/js/cards"
:asset-path "./js/cards"
:preloads [] ; optional, list namespaces to be pre loaded
}
:app-with-cljs-kernel-dev {:target :browser
:build-options {:ns-aliases {pinkgorilla.kernel.cljs pinkgorilla.kernel.shadowcljs
pinkgorilla.tenx.config pinkgorilla.tenx.on}}
;; Not honored with :browser :target
;; :output-to "target/cljsbuild/gorilla-repl-client/js/gorilla.js"
:output-dir "target/cljsbuild/gorilla-repl-client/js/cljs"
:asset-path "./js/cljs"
:js-options {:minimize-require false ; module requires full name instead of index
;:js-package-dirs ["packages/babel-worker/node_modules"]
;:js-provider :require
}
:compiler-options {:optimizations :none ; :simple
:external-config {:gorilla/config {:with-cljs-kernel true
:10x true}}
:closure-defines {re_frame.trace.trace_enabled? true}
:externs ["src/gorilla-repl-externs.js"]
;; :devcards true
}
:modules {;; :core {:entries [pinkgorilla.core]}
:gorilla {:entries [pinkgorilla.app]
;; :depends-on #{:core}
}
;; :devcards
#_{:entries [pinkgorilla.cards]
:depends-on #{:core}}}
:devtools {:http-root "out/public"
:http-port 8702
;; :http-handler shadow.http.push-state/handle
:preloads [; namespaces to be added to the bundle
day8.re-frame-10x.preload
pinkgorilla.dev-notebook
;devtools.preload
;; frisk is the plain reagent version w/o re-frame
;; frisk.preload
;; re-frisk.preload
]
:before-load pinkgorilla.dev-notebook/before-load
:after-load pinkgorilla.dev-notebok/after-load
;; Just in case we really want this:
;; https://clojureverse.org/t/improving-initial-load-time-for-browser-builds-during-development/2518
;; :loader-mode :script
}}}}