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:
Florian Schroedl
2026-04-04 18:38:22 +02:00
parent 9c3ecc7038
commit 38a15b7a34
2 changed files with 5 additions and 1 deletions

4
bb.edn
View File

@@ -5,7 +5,11 @@
cljs {:doc "Compile ClojureScript (one-shot)"
: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)"
:depends [cljs:clean]
:task (shell "clj" "-M:cljs-dev")}
test {:doc "Run all server tests"