feat(demo): local dev-demo runner — R2 libs + example gallery, no backend/partykit

scripts/deploy/dev-demo.mjs (+ `pnpm dev:demo`) is the dev sibling of
build-demo.mjs: it runs the standalone via `vite dev` in the no-backend demo
configuration so a local WASM build can be exercised against the live R2 CDN.

  - libraries: live R2 CDN (VITE_LIBS_SOURCE=cdn, libs/kicad/<lib-tag>, default
    10.0.3) — IDB-cached, read-only; the lazy/fat lib-load path
  - projects: the read-only example gallery (deploy/demo/gallery.json → the same
    "Demo Board") built locally via publish-content.mjs and served same-origin at
    /content/<gallery-tag>/; --content-tag pins the live CDN gallery instead;
    --no-gallery falls back to local-folder + IDB only
  - no partykit (VITE_YJS_PROVIDER=broadcastchannel), no REST backend
    (offline.invalid → local-folder loader), browser-local IDB projects
  - WASM: local fresh build at /wasm (default) or --wasm r2

The generated gallery (public/content symlink, web/standalone/.demo-cdn) is
gitignored, mirroring the public/wasm dev symlink.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Gergő Törcsvári 2026-06-26 08:16:43 +02:00
commit e8d964d871
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
3 changed files with 205 additions and 0 deletions

4
web/.gitignore vendored
View file

@ -9,3 +9,7 @@ dist/
# (tests/apps/kicad), created on `dev` — never committed.
**/public/wasm
**/public/wasm/
# Demo gallery: public/content symlinks the locally-built example gallery and
# .demo-cdn holds its generated bytes — both created by scripts/deploy/dev-demo.mjs.
**/public/content
**/standalone/.demo-cdn/