🎉 Make the build to be config independent.

Loading the configuration dinamically using
global variables defined in index.html.
This commit is contained in:
Andrey Antukh 2020-03-11 09:20:12 +01:00
parent 1ce46a0ef8
commit c09f281f58
6 changed files with 38 additions and 21 deletions

View file

@ -11,6 +11,7 @@
(:require
[cljs.spec.alpha :as s]
[beicon.core :as rx]
[goog.object :as gobj]
[rumext.alpha :as mf]
[uxbox.main.data.auth :refer [logout]]
[uxbox.main.data.users :as udu]
@ -66,11 +67,12 @@
(def app-sym (.for js/Symbol "uxbox.app"))
(defn ^:export init
[translations]
(i18n/init! (js/JSON.parse translations))
(unchecked-set js/window app-sym "main")
(st/init)
(init-ui))
[]
(let [translations (gobj/get goog.global "uxboxTranslations")]
(i18n/init! translations)
(unchecked-set js/window app-sym "main")
(st/init)
(init-ui)))
(defn reinit
[]