Keep gate copies aligned for release
All checks were successful
ci / build (push) Successful in 36s
release / release (push) Successful in 54s

This commit is contained in:
Yun Chan 2026-09-12 15:31:12 +09:00
parent 45ba92ea82
commit 69e5cc1efd
2 changed files with 86 additions and 14 deletions

View file

@ -7,8 +7,16 @@ import url from "node:url";
const repo = path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), "../../..");
const gate = path.join(repo, "apps/site/tools/design-gate.mjs");
const packagedGate = path.join(repo, "packages/skill/tools/design-gate.mjs");
const work = fs.mkdtempSync(path.join(os.tmpdir(), "design-gate-contract-"));
const normalizedSource = (file) => fs.readFileSync(file, "utf8").replace(/\r\n/g, "\n");
assert.equal(
normalizedSource(gate),
normalizedSource(packagedGate),
"apps/site/tools/design-gate.mjs must match packages/skill/tools/design-gate.mjs",
);
const configFor = (page, extra = {}) => ({
pages: [{ name: "fixture", path: page, h1: "h1", ...extra }],
widths: [375, 390],