Files
workinf_Blender_Wasm/tools/web/incremental-web-build.mjs
mes123456 f3e21c6b98
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-10 11:18:01 +08:00

26 lines
1.0 KiB
JavaScript

import { spawnSync } from "node:child_process";
import fs from "node:fs";
import { fingerprint, readState, root, writeState } from "./web-build-fingerprint.mjs";
const currentFingerprint = fingerprint();
const state = readState("web-build-success.json");
const index = `${root}/web/dist/index.html`;
if (state?.fingerprint === currentFingerprint && fs.existsSync(index)) {
process.stdout.write(`web-build-reused fingerprint=${currentFingerprint}\n`);
process.exit(0);
}
if (process.env.WBV2_SKIP_TYPECHECK !== "1") {
const typecheck = spawnSync(process.execPath, ["tools/web/run-incremental-typecheck.mjs"], {
cwd: root,
stdio: "inherit",
});
if (typecheck.status !== 0) process.exit(typecheck.status ?? 1);
}
const vite = spawnSync(process.execPath, ["./node_modules/vite/bin/vite.js", "build", "--config", "app/vite.config.ts"], {
cwd: `${root}/web`,
stdio: "inherit",
});
if (vite.status !== 0) process.exit(vite.status ?? 1);
writeState("web-build-success.json", { schemaVersion: 1, fingerprint: currentFingerprint });