Add Eve surface projection module

This commit is contained in:
Meta Vens 2026-05-31 12:58:55 +01:00
commit cf7e7f4df2
7 changed files with 714 additions and 1 deletions

View file

@ -2,7 +2,7 @@ import fs from "node:fs/promises";
import path from "node:path";
const root = new URL("..", import.meta.url);
const files = ["sai.js", "sai.css", "ink.js"];
const files = ["sai.js", "sai.css", "ink.js", "eve.js"];
await fs.mkdir(new URL("dist/", root), { recursive: true });

View file

@ -5,6 +5,7 @@ const required = [
"dist/sai.js",
"dist/sai.css",
"dist/ink.js",
"dist/eve.js",
"examples/static-site/index.html",
"docs/manifest.md",
];
@ -15,6 +16,7 @@ for (const file of required) {
const script = await fs.readFile(new URL("dist/sai.js", root), "utf8");
const css = await fs.readFile(new URL("dist/sai.css", root), "utf8");
const eve = await fs.readFile(new URL("dist/eve.js", root), "utf8");
if (!script.includes("window.Sai")) {
throw new Error("dist/sai.js must expose window.Sai");
@ -28,4 +30,8 @@ if (!css.includes(".sai-player")) {
throw new Error("dist/sai.css must style .sai-player");
}
if (!eve.includes("gamecult.eve.surface.v1")) {
throw new Error("dist/eve.js must publish the Eve surface schema id");
}
console.log("Sai package checks passed.");