`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.
31 lines
1,006 B
JSON
31 lines
1,006 B
JSON
{
|
|
"name": "medieval-kit-workspace",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit",
|
|
"verify": "bun scripts/verify-model.ts",
|
|
"check:docs": "bun scripts/check-docs.ts",
|
|
"registry:build": "bun my-registry/build.ts",
|
|
"registry:validate": "vibe3d registry validate my-registry/dist/registry.json",
|
|
"viewer:build": "vite build --config vite.viewer.config.ts && bun scripts/build-artifact.ts",
|
|
"site:build": "bun run registry:build && bun run viewer:build && bun scripts/build-site.ts",
|
|
"verify:glb": "bun scripts/verify-glb.ts",
|
|
"render": "bun scripts/render.ts",
|
|
"export:glb": "bun scripts/export-glb.ts"
|
|
},
|
|
"dependencies": {
|
|
"three": "^0.185.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.15.3",
|
|
"@types/three": "^0.185.4",
|
|
"@webgpu/types": "^0.1.72",
|
|
"typescript": "^5.9.2",
|
|
"vibe3d": "^0.0.1",
|
|
"vite": "^7.1.5"
|
|
}
|
|
}
|