From ac32060655a9f349d9b1bdc3733969e28d329d63 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Sat, 21 Oct 2017 20:17:29 +0300 Subject: [PATCH] Call init! in the prod build --- demo/reagentdemo/prod.cljs | 6 ++++++ project.clj | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 demo/reagentdemo/prod.cljs diff --git a/demo/reagentdemo/prod.cljs b/demo/reagentdemo/prod.cljs new file mode 100644 index 0000000..a1f5c6e --- /dev/null +++ b/demo/reagentdemo/prod.cljs @@ -0,0 +1,6 @@ +(ns reagentdemo.prod + "Initializes the demo app" + (:require [reagentdemo.core :as core])) + +(core/init!) + diff --git a/project.clj b/project.clj index 3b7158d..cc39d26 100644 --- a/project.clj +++ b/project.clj @@ -43,12 +43,11 @@ :cljsbuild {:builds {:client - {:source-paths ["demo" "test"] + {:source-paths ["src" "demo" "test"] :figwheel true :compiler {:parallel-build true :source-map true :optimizations :none - ; :main "reagentdemo.core" :main "reagentdemo.dev" :output-dir "target/cljsbuild/client/public/js/out" :output-to "target/cljsbuild/client/public/js/main.js" @@ -57,7 +56,7 @@ :process-shim true}} :test - {:source-paths ["test"] + {:source-paths ["src" "test"] :compiler {:parallel-build true :source-map true :optimizations :none @@ -69,7 +68,7 @@ :process-shim true}} :prerender - {:source-paths ["demo"] + {:source-paths ["src" "demo"] :compiler {:main "sitetools.prerender" :target :nodejs :process-shim false @@ -77,7 +76,7 @@ :output-to "target/cljsbuild/prerender/main.js"}} :node-test - {:source-paths ["test"] + {:source-paths ["src" "test"] :compiler {:main "reagenttest.runtests" :target :nodejs :parallel-build true @@ -87,8 +86,8 @@ :output-to "target/cljsbuild/node-test/main.js"}} :prod - {:source-paths ["demo"] - :compiler {:main "reagentdemo.core" + {:source-paths ["src" "demo"] + :compiler {:main "reagentdemo.prod" :optimizations :advanced :elide-asserts true :pretty-print false @@ -98,7 +97,7 @@ :closure-warnings {:global-this :off}}} :prod-test - {:source-paths ["demo"] + {:source-paths ["src" "demo"] :compiler {:main "reagenttest.runtests" :optimizations :advanced :elide-asserts true