0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 15:39:50 -05:00

misc(frontend): minor improvements on tools.clj script

This commit is contained in:
Andrey Antukh 2019-07-03 09:31:15 +02:00
parent 93b4258f02
commit 1fbd353001

View file

@ -72,26 +72,43 @@
:output-dir "target/tests/main" :output-dir "target/tests/main"
:optimizations :none))) :optimizations :none)))
(defmethod task "figwheel"
[args] (def figwheel-builds
(figwheel/start {:main {:id "main"
:options (merge default-build-options
(get-output-options "main" false true))}
:view {:id "view"
:options (merge default-build-options
(get-output-options "view" false true))}
:worker {:id "worker"
:options (merge default-build-options
{:target :webworker}
(get-output-options "worker" false true))}})
(def figwheel-options
{:open-url false {:open-url false
:load-warninged-code true :load-warninged-code true
:auto-testing false :auto-testing false
:css-dirs ["resources/public/css" :css-dirs ["resources/public/css"
"resources/public/view/css"] "resources/public/view/css"]
:ring-server-options {:port 3449 :host "0.0.0.0"} :ring-server-options {:port 3449 :host "0.0.0.0"}
:watch-dirs ["src" "test"]} :watch-dirs ["src" "test"]})
{:id "main"
:options (merge default-build-options (defmethod task "figwheel"
(get-output-options "main" false true))} [& args]
{:id "view" (figwheel/start
:options (merge default-build-options figwheel-options
(get-output-options "view" false true))} (:main figwheel-builds)
{:id "worker" (:view figwheel-builds)
:options (merge default-build-options (:worker figwheel-builds)))
{:target :webworker}
(get-output-options "worker" false true))})) (defmethod task "figwheel-single"
[[_ name]]
(when-let [build (get figwheel-builds (keyword name))]
(figwheel/start
figwheel-options
build
(:worker figwheel-builds))))
;;; Build script entrypoint. This should be the last expression. ;;; Build script entrypoint. This should be the last expression.