From 7103b35686e9c1dcf07aece0f86b5f0d42202034 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 20 Jun 2019 22:34:42 +0200 Subject: [PATCH] feat(frontend): add "build-tests" command --- frontend/tools.clj | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/frontend/tools.clj b/frontend/tools.clj index 517fec102..02a07a2ef 100644 --- a/frontend/tools.clj +++ b/frontend/tools.clj @@ -46,7 +46,7 @@ (defmethod task "dist" [[_ name]] - (api/build (api/inputs "src" "test") + (api/build (api/inputs "src") (merge default-build-options (get-output-options name true ::path) {:optimizations :advanced @@ -55,11 +55,23 @@ (defmethod task "build" [[_ name]] - (api/build (api/inputs "src" "test") + (api/build (api/inputs "src") (merge default-build-options (get-output-options name false ::path) {:optimizations :simple}))) +(defmethod task "build-tests" + [& args] + (api/build (api/inputs "src" "test") + (assoc default-build-options + :main 'uxbox.tests.main + :verbose true + :target :nodejs + :source-map true + :output-to "target/tests/main.js" + :output-dir "target/tests/main" + :optimizations :none))) + (defmethod task "figwheel" [args] (figwheel/start