(defn
init
[]
(swap!
*state
merge
(->
(.querySelector js/document "#initial-state")
.-textContent
read-string))
(rum/mount (common/app *state) (.querySelector js/document "#app"))
(let
[{:keys [static? dev? watcher]} @*state]
(when (and (not static?) (not dev?)) (check-version))
(swap!
*state
assoc
:cljs-started?
true
:exportable?
js/COMPILED
:init-editor
init-editor
:init-example-editor
init-example-editor
:watcher
(when-not js/COMPILED (or watcher (init-watcher!)))))
(when
(:var-sym @*state)
(doseq
[button (-> js/document (.querySelectorAll ".button") array-seq)]
(set! (.-display (.-style button)) "inline-block"))))