feat: 收口多品牌与模板构建基础

This commit is contained in:
que01 committed 2026-09-25 02:55:46 +08:00
1 parent 0425a1c672
commit 77224ea51f
317 files changed
+11290 -1158

No files matched your search

@@ -3,8 +3,8 @@ const path = require("node:path");
const root = path.resolve(__dirname, "..");
const fixtureFiles = [
"linjing-door-visual.json",
"minimal-neutral-visual.json",
"doors-visual.json",
"acheng-campus-food-visual.json",
];
const fixtures = fixtureFiles.map((file) =>
JSON.parse(fs.readFileSync(path.join(__dirname, "fixtures", file), "utf8")),
@@ -22,8 +22,10 @@ for (const fixture of fixtures) {
.map((match) => match[1])
.filter((name) => name.includes("-"));
for (const ref of componentRefs) {
const candidate = path.join(root, "components/modules", ref, `${ref}.wxml`);
if (fs.existsSync(candidate)) content += fs.readFileSync(candidate, "utf8");
for (const componentRoot of ["components/modules", "components/templates"]) {
const candidate = path.join(root, componentRoot, ref, `${ref}.wxml`);
if (fs.existsSync(candidate)) content += fs.readFileSync(candidate, "utf8");
}
}
for (const anchor of definition.anchors)
if (!content.includes(anchor)) failures.push(`${state}: missing anchor ${anchor}`);