Commit Graph
7 Commits
Author SHA1 Message Date
hypercross b4cdcdeb42 fix(bgm): pass options arg to buildStart in unit test
Vite 8 (rolldown) changed buildStart to take (this, options), so the
test's one-arg call failed typecheck. Add an ambient declaration for the
fixture's virtual bgm modules so its entry typechecks in the editor.
2026-08-09 22:17:19 +08:00
hypercross 0503ac84a7 feat(bgm): resolve relative part assets against source dir 2026-08-09 21:19:37 +08:00
hypercross 599fb6a76d feat(bgm): add surface mounting and setup surfaces 2026-08-09 21:03:20 +08:00
hypercross 7f3f758c52 test(bgm): cover emitted shape and multi-package collection
Add a SerializedPackage type for the JSON the plugin emits, and tests
that assert the maps serialize to plain objects, that the packages module
returns every package, and that buildStart watches def files. Add a
second fixture package to exercise multi-package collection.
2026-08-09 19:23:50 +08:00
hypercross 845d510948 refactor(bgm): use virtual: module specifiers
Rename the plugin's virtual modules to virtual:bgm/packages and
virtual:bgm/package/<id> so they read as plugin-provided modules rather
than real packages. Update the unit and build integration tests.
2026-08-09 19:16:17 +08:00
hypercross ba16f17d8a feat(bgm): add vite plugin and build integration test
Move the bgm vite plugin into the package so it can be tested in
isolation from the web app. Serve each package as a JSON module,
serializing its maps, and verify resolution through a real vite build
against a self-contained fixture.
2026-08-09 19:07:14 +08:00
hypercross c0967ab71f feat(bgm): add board game manifest loader
Parse yaml/json/toml and markdown code blocks into packages, expanding
$variants via typed-csv and collecting parts, surfaces, and setups by
include patterns. Ships zod validation, a vitest config, and 16 tests.
2026-08-09 18:59:14 +08:00