Files
pk-lab-xhs/scripts/check.py
T
codex-bot 36aee09dfa
Verify mini program and deploy preview / verify-deploy (push) Successful in 50s
feat: add animated choice modes and bracket editor
2026-09-19 04:11:21 +08:00

26 lines
719 B
Python

import json
from pathlib import Path
required = [
"app.js",
"app.json",
"pages/index/index.xhsml",
"pages/discover/discover.xhsml",
"pages/test/test.js",
"pages/result/result.js",
"assets/test-covers/rice.jpg",
"vendor/poster-editor.cjs",
"web/index.html",
"web/app.js",
]
missing = [name for name in required if not Path(name).is_file()]
if missing:
raise SystemExit("Missing required files: " + ", ".join(missing))
json.loads(Path("app.json").read_text())
web = Path("web/index.html").read_text()
if "./app.js" not in web or "./style.css" not in web:
raise SystemExit("Preview assets are not linked")
print(f"Static checks passed ({len(required)} required files).")