Files
pk-lab-xhs/scripts/check.mjs
T
codex-bot 350aae797f
Verify mini program and deploy preview / verify-deploy (push) Failing after 34s
feat: launch PK testing application
2026-09-18 21:50:25 +08:00

9 lines
566 B
JavaScript

import { readFileSync, existsSync } from 'node:fs';
const required = ['app.js','app.json','pages/index/index.xhsml','pages/test/test.js','pages/result/result.js','web/index.html','web/app.js'];
for (const file of required) if (!existsSync(file)) throw new Error(`Missing ${file}`);
JSON.parse(readFileSync('app.json','utf8'));
const web = readFileSync('web/index.html','utf8');
if (!web.includes('./app.js') || !web.includes('./style.css')) throw new Error('Preview assets are not linked');
console.log(`Static checks passed (${required.length} required files).`);