medieval-kit/scripts
CRT 7157c928c8 Make the viewer publishable as a static site
`bun run site:build` and the output is a site: the viewer at a domain root,
with an `index.html` a host can answer `/` with. The viewer build already
emitted everything else — `viewer.js` and `viewer.css` loaded by absolute path,
which is correct at a root and wrong nowhere — but it emitted no index, so a
static host serving the directory answered `/` with a 404 and the site would
have looked broken while every file on it was fine.

The landing page is the VIEWER rather than the demo app, which is the one
decision in the script and the reason it is a script: someone arriving at the
address should be able to turn a model over and press play, not read a page
about a model they cannot see.

Verified the way a host would see it rather than through the dev server: built,
served from the directory as a root, and every one of the page's own requests
came back 200 — `/`, `/viewer.js`, `/viewer.css` — with a clean console and all
38 models in the rail. Nothing is fetched at run time, either; the registry
address in the sidebar is a label, not a request, so there is no API to stand
up.

`vercel.json` carries the build command, the output directory and a year of
immutable caching on the two hashed assets. Cloudflare Pages takes the same
two settings in its dashboard.

GitHub Pages is in the README's table with a "no" against it, because it is the
obvious guess and the answer costs money: on the free plan Pages serves public
repositories only. Worth stating where someone will look for it rather than
leaving them to find out.

And one line that is a decision rather than a fact, so it is written down:
publishing the viewer publishes the models. The bundle carries every builder in
it, minified. That is a different thing from the npm package — which ships the
source AS source, comments and all — but it is not nothing.
2026-08-27 06:19:50 +00:00
..
audit.ts Enforce "nothing floats", and rebuild the barrel from a reference photo 2026-08-21 12:23:11 +00:00
build-artifact.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
build-site.ts Make the viewer publishable as a static site 2026-08-27 06:19:50 +00:00
catalog-table.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
check-docs.ts Check the documentation against the kit it describes 2026-08-26 18:37:18 +00:00
export-glb.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
probe-bench.ts Take the shoulder off the bench's feet 2026-08-26 19:02:35 +00:00
probe-tree.ts Add the oak 2026-08-23 12:47:21 +00:00
reference-shots.ts Add the reference-shot generator 2026-08-21 12:45:58 +00:00
render.ts Lay the whole-kit scene out square, and let it be the picture 2026-08-26 18:50:26 +00:00
support.ts Enforce "nothing floats", and rebuild the barrel from a reference photo 2026-08-21 12:23:11 +00:00
verify-glb.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
verify-model.ts Add the market stall 2026-08-26 20:17:02 +00:00
zfight.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00