fix(wasm-dom): serve:dom script; keep kicad bundles out of the apps-dom mirror

The wx test-app mirror (build-wasm-test.sh --dom, rsync --delete) wiped
the kicad bundles setup-kicad-wasm.sh syncs into apps-dom/kicad —
apps/kicad only carries the checked-in HTML. Exclude kicad/ (that dir is
owned by the setup script). Add 'npm run serve:dom' for browsing the
DOM-port apps; plain 'npm run serve' serves the canvas dir, which has no
kicad bundles in this worktree (canvas KiCad was never built here).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-06-11 15:13:29 +02:00
commit a275ca735f
2 changed files with 6 additions and 0 deletions

View file

@ -44,7 +44,12 @@ if [ "$DOM_BUILD" = "1" ]; then
# coexist; relative ../../ paths in Makefile.wasm resolve identically.
WASM_APP_DIR="$TESTS_DIR/apps-dom"
echo "Mirroring test app sources into apps-dom..."
# kicad/ is excluded: apps-dom/kicad is owned by
# tests/scripts/setup-kicad-wasm.sh (DOM bundles + injected pages) and
# apps/kicad only has the checked-in HTML — mirroring with --delete
# would wipe the synced multi-hundred-MB kicad artifacts.
rsync -a --delete \
--exclude 'kicad/' \
--exclude '*.o' --exclude '*.d' \
--exclude '*_test.html' --exclude '*_test.js' --exclude '*_test.wasm' \
--exclude '*_repro.html' --exclude '*_repro.js' --exclude '*_repro.wasm' \