Only remove js dir if it exists.
This is to fix a bug where scittle throws an error if you do a prod build on a fresh checkout.
This commit is contained in:
parent
dbbb3ef2d2
commit
2baea0e3c4
1 changed files with 5 additions and 3 deletions
8
bb.edn
8
bb.edn
|
|
@ -13,9 +13,11 @@
|
||||||
[babashka.process :as p :refer [process]])
|
[babashka.process :as p :refer [process]])
|
||||||
|
|
||||||
clean {:doc "Start from clean slate."
|
clean {:doc "Start from clean slate."
|
||||||
:task (do (run! fs/delete (fs/list-dir (fs/file "resources" "public" "js") "**.*"))
|
:task (let [js-dir (fs/file "resources" "public" "js")]
|
||||||
(fs/delete-tree ".cpcache")
|
(when (fs/directory? js-dir)
|
||||||
(fs/delete-tree ".shadow-cljs"))}
|
(run! fs/delete (fs/list-dir js-dir "**.*")))
|
||||||
|
(fs/delete-tree ".cpcache")
|
||||||
|
(fs/delete-tree ".shadow-cljs"))}
|
||||||
|
|
||||||
shadow:watch {:doc "Development build. Starts webserver and watches for changes."
|
shadow:watch {:doc "Development build. Starts webserver and watches for changes."
|
||||||
:task (build/build {:action "watch"
|
:task (build/build {:action "watch"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue