mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
misc(frontend): minor improvements on tools.clj script
This commit is contained in:
parent
93b4258f02
commit
1fbd353001
1 changed files with 35 additions and 18 deletions
|
@ -72,26 +72,43 @@
|
|||
:output-dir "target/tests/main"
|
||||
:optimizations :none)))
|
||||
|
||||
|
||||
(def figwheel-builds
|
||||
{: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
|
||||
:load-warninged-code true
|
||||
:auto-testing false
|
||||
:css-dirs ["resources/public/css"
|
||||
"resources/public/view/css"]
|
||||
:ring-server-options {:port 3449 :host "0.0.0.0"}
|
||||
:watch-dirs ["src" "test"]})
|
||||
|
||||
(defmethod task "figwheel"
|
||||
[args]
|
||||
[& args]
|
||||
(figwheel/start
|
||||
{:open-url false
|
||||
:load-warninged-code true
|
||||
:auto-testing false
|
||||
:css-dirs ["resources/public/css"
|
||||
"resources/public/view/css"]
|
||||
:ring-server-options {:port 3449 :host "0.0.0.0"}
|
||||
:watch-dirs ["src" "test"]}
|
||||
{:id "main"
|
||||
:options (merge default-build-options
|
||||
(get-output-options "main" false true))}
|
||||
{:id "view"
|
||||
:options (merge default-build-options
|
||||
(get-output-options "view" false true))}
|
||||
{:id "worker"
|
||||
:options (merge default-build-options
|
||||
{:target :webworker}
|
||||
(get-output-options "worker" false true))}))
|
||||
figwheel-options
|
||||
(:main figwheel-builds)
|
||||
(:view figwheel-builds)
|
||||
(:worker figwheel-builds)))
|
||||
|
||||
(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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue