Compare commits
1
Commits
v0.6.4
...
7533226366
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7533226366 |
@@ -54,6 +54,7 @@
|
||||
"verify:docx-layout-visual-matrix": "npm run test:docx-layout-visual-matrix-cases && npm run verify:font-pack && npm run build:web-runtime && npm run build -w @md-to-pdf/document-visual-diff && npm run build -w @md-to-pdf/server && node scripts/verify-docx-layout-visual-matrix.mjs",
|
||||
"verify:docx-release-gate-suite": "npm run test:docx-layout-visual-matrix-cases && npm run test:docx-real-world-corpus && npm run test:docx-release-gate-suites && npm run verify:font-pack && npm run build:web-runtime && npm run build -w @md-to-pdf/document-visual-diff && npm run build -w @md-to-pdf/server && node scripts/verify-docx-release-gate-suite.mjs",
|
||||
"verify:docx-release-gate-560": "npm run verify:docx-release-gate-suite",
|
||||
"clean:docx-gate-output": "node scripts/clean-docx-gate-output.mjs",
|
||||
"test": "npm run test:release-stage && npm run test:docx-layout-visual-matrix-cases && npm run test:docx-real-world-corpus && npm run test:docx-release-gate-suites && npm run test -w @md-to-pdf/markdown-echarts && npm run test -w @md-to-pdf/core && npm run build -w @md-to-pdf/core && npm run test -w @md-to-pdf/semantic-document && npm run build -w @md-to-pdf/semantic-document && npm run test -w @md-to-pdf/docx-theme-engine && npm run test -w @md-to-pdf/document-visual-diff && npm run test -w @md-to-pdf/font-pack-registry && npm run build -w @md-to-pdf/font-pack-registry && npm run test -w @md-to-pdf/docx-engine && npm run build -w @md-to-pdf/docx-engine && npm run test -w @md-to-pdf/font-pack-builder && npm run test -w @md-to-pdf/renderer && npm run test -w @md-to-pdf/application && npm run build -w @md-to-pdf/application && npm run test -w @md-to-pdf/preview-engine && npm run build -w @md-to-pdf/preview-engine && npm run test -w @md-to-pdf/web && npm run test -w @md-to-pdf/server && npm run test -w @md-to-pdf/desktop",
|
||||
"typecheck": "npm run typecheck -w @md-to-pdf/markdown-echarts && npm run build -w @md-to-pdf/markdown-echarts && npm run typecheck -w @md-to-pdf/core && npm run build -w @md-to-pdf/core && npm run typecheck -w @md-to-pdf/semantic-document && npm run build -w @md-to-pdf/semantic-document && npm run typecheck -w @md-to-pdf/docx-theme-engine && npm run build -w @md-to-pdf/docx-theme-engine && npm run typecheck -w @md-to-pdf/document-visual-diff && npm run typecheck -w @md-to-pdf/font-pack-registry && npm run typecheck -w @md-to-pdf/docx-engine && npm run build -w @md-to-pdf/docx-engine && npm run typecheck -w @md-to-pdf/font-pack-builder && npm run typecheck -w @md-to-pdf/renderer && npm run build -w @md-to-pdf/renderer && npm run typecheck -w @md-to-pdf/application && npm run build -w @md-to-pdf/application && npm run typecheck -w @md-to-pdf/preview-engine && npm run build -w @md-to-pdf/preview-engine && npm run typecheck -w @md-to-pdf/web && npm run typecheck -w @md-to-pdf/server && npm run typecheck -w @md-to-pdf/desktop"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
const repositoryDirectory = path.resolve(import.meta.dirname, "..");
|
||||
const outputDirectory = path.join(repositoryDirectory, "output");
|
||||
|
||||
const targets = [path.join(outputDirectory, "docx-release-gate")];
|
||||
|
||||
if (fs.existsSync(outputDirectory)) {
|
||||
for (const entry of fs.readdirSync(outputDirectory, { withFileTypes: true })) {
|
||||
if (entry.isDirectory() && /^docx-release-gate-v/u.test(entry.name)) {
|
||||
targets.push(path.join(outputDirectory, entry.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let removedCount = 0;
|
||||
for (const target of targets) {
|
||||
if (fs.existsSync(target)) {
|
||||
fs.rmSync(target, { recursive: true, force: true });
|
||||
process.stdout.write(`已删除:${path.relative(repositoryDirectory, target)}\n`);
|
||||
removedCount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (removedCount === 0) {
|
||||
process.stdout.write("没有找到需要清理的门禁产出目录。\n");
|
||||
}
|
||||
@@ -16,10 +16,13 @@ import {
|
||||
const execFileAsync = promisify(execFile);
|
||||
const repositoryDirectory = path.resolve(import.meta.dirname, "..");
|
||||
const matrixScript = path.join(repositoryDirectory, "scripts", "verify-docx-layout-visual-matrix.mjs");
|
||||
const repositoryVersion = JSON.parse(
|
||||
fs.readFileSync(path.join(repositoryDirectory, "package.json"), "utf8")
|
||||
).version;
|
||||
const outputRoot = path.resolve(
|
||||
repositoryDirectory,
|
||||
process.env.MD_TO_PDF_RELEASE_GATE_OUTPUT_DIR?.trim() ||
|
||||
"output/docx-release-gate-v0.6.2"
|
||||
path.join("output", "docx-release-gate", `v${repositoryVersion}`)
|
||||
);
|
||||
const requestedSuiteId = process.env.MD_TO_PDF_RELEASE_GATE_SUITE?.trim() || "next";
|
||||
const selectedCaseId = process.env.MD_TO_PDF_RELEASE_GATE_CASE?.trim() || undefined;
|
||||
|
||||
Reference in New Issue
Block a user