🎉 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

@ -28,20 +28,11 @@
;; --- Generic Build Options
(def closure-defines
(let [url (some-> (:uxbox-api-url env)
(str/trim))
demo-warn (some-> (:uxbox-demo-warning env)
(str/trim))]
{'uxbox.config.url (if (nil? url) "http://localhost:6060" url)
'uxbox.config.demo-warning (= "true" demo-warn)}))
(def default-build-options
{:cache-analysis true
:parallel-build true
:language-in :ecmascript6
:language-out :ecmascript5
:closure-defines closure-defines
:anon-fn-naming-policy :mapped
:optimizations :none
:infer-externs true