[FIX #1731] Prepare configuration allowing to fail build
This commit is contained in:
parent
bc73fbd83e
commit
99e04105ec
|
@ -42,7 +42,8 @@
|
||||||
:compiler {:output-to "target/android/app.js"
|
:compiler {:output-to "target/android/app.js"
|
||||||
:main "env.android.main"
|
:main "env.android.main"
|
||||||
:output-dir "target/android"
|
:output-dir "target/android"
|
||||||
:optimizations :none}}}}
|
:optimizations :none}
|
||||||
|
:warning-handlers [status-im.utils.build/warning-handler]}}}
|
||||||
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]
|
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]
|
||||||
:timeout 240000}}
|
:timeout 240000}}
|
||||||
:test {:dependencies [[day8.re-frame/test "0.1.5"]]
|
:test {:dependencies [[day8.re-frame/test "0.1.5"]]
|
||||||
|
@ -73,7 +74,8 @@
|
||||||
:optimizations :simple
|
:optimizations :simple
|
||||||
:closure-defines {"goog.DEBUG" false}
|
:closure-defines {"goog.DEBUG" false}
|
||||||
:parallel-build true
|
:parallel-build true
|
||||||
:language-in :ecmascript5}}
|
:language-in :ecmascript5}
|
||||||
|
:warning-handlers [status-im.utils.build/warning-handler]}
|
||||||
:android
|
:android
|
||||||
{:source-paths ["react-native/src" "src" "env/prod"]
|
{:source-paths ["react-native/src" "src" "env/prod"]
|
||||||
:compiler {:output-to "index.android.js"
|
:compiler {:output-to "index.android.js"
|
||||||
|
@ -84,4 +86,5 @@
|
||||||
:optimizations :simple
|
:optimizations :simple
|
||||||
:closure-defines {"goog.DEBUG" false}
|
:closure-defines {"goog.DEBUG" false}
|
||||||
:parallel-build true
|
:parallel-build true
|
||||||
:language-in :ecmascript5}}}}}})
|
:language-in :ecmascript5}
|
||||||
|
:warning-handlers [status-im.utils.build/warning-handler]}}}}})
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
(ns status-im.utils.build
|
||||||
|
(:require [cljs.analyzer :as analyzer]))
|
||||||
|
|
||||||
|
(defn warning-handler [warning-type env extra]
|
||||||
|
(when (warning-type analyzer/*cljs-warnings*)
|
||||||
|
(when-let [s (analyzer/error-message warning-type extra)]
|
||||||
|
(binding [*out* *err*]
|
||||||
|
(println (analyzer/message env (str "\u001B[31mWARNING\u001B[0m: " s))))
|
||||||
|
;; TODO Do not enable yet as our current reagent version generates warnings
|
||||||
|
#_(System/exit 1))))
|
Loading…
Reference in New Issue