fix: CLJS watch mode missing todomvc from cljs_deps.js
Two issues caused "Loading from local store..." after tmux restart: 1. Watch path only included `src/`, so `example/todomvc/` sources weren't compiled on the watcher's initial build, leaving pocketbook.todomvc out of cljs_deps.js. Fix: `-w "src:example/todomvc"` 2. Stale output dir from previous builds caused incremental compile to skip regenerating cljs_deps.js. Fix: `cljs:clean` task (deletes js output) runs before `cljs:watch`.
This commit is contained in:
4
bb.edn
4
bb.edn
@@ -5,7 +5,11 @@
|
|||||||
cljs {:doc "Compile ClojureScript (one-shot)"
|
cljs {:doc "Compile ClojureScript (one-shot)"
|
||||||
:task (shell "clj" "-M:cljs")}
|
:task (shell "clj" "-M:cljs")}
|
||||||
|
|
||||||
|
cljs:clean {:doc "Remove compiled CLJS output"
|
||||||
|
:task (babashka.fs/delete-tree "example/todomvc/js")}
|
||||||
|
|
||||||
cljs:watch {:doc "Compile ClojureScript (watch mode)"
|
cljs:watch {:doc "Compile ClojureScript (watch mode)"
|
||||||
|
:depends [cljs:clean]
|
||||||
:task (shell "clj" "-M:cljs-dev")}
|
:task (shell "clj" "-M:cljs-dev")}
|
||||||
|
|
||||||
test {:doc "Run all server tests"
|
test {:doc "Run all server tests"
|
||||||
|
|||||||
2
deps.edn
2
deps.edn
@@ -25,4 +25,4 @@
|
|||||||
:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.132"}
|
:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.132"}
|
||||||
com.cognitect/transit-cljs {:mvn/version "0.8.280"}
|
com.cognitect/transit-cljs {:mvn/version "0.8.280"}
|
||||||
org.clojure/core.async {:mvn/version "1.7.701"}}
|
org.clojure/core.async {:mvn/version "1.7.701"}}
|
||||||
:main-opts ["-m" "cljs.main" "-co" "build.edn" "-w" "src" "-c"]}}}
|
:main-opts ["-m" "cljs.main" "-co" "build.edn" "-w" "src:example/todomvc" "-c"]}}}
|
||||||
|
|||||||
Reference in New Issue
Block a user