Files
yun-xue-tang-assistant/package.json
T
void c1e883d67f refactor: 重组目录结构,脚本收进 scripts/,配置独立成 config/
根目录原来平铺了构建脚本、运行器配置、两个 .cmd 启动器和一份中文名的
实跑报告,四类东西混在一起,新人分不清哪个是源码、哪个是产物。这次按
职责分层重排:

- 构建与检查脚本收进 scripts/:build.mjs、check.mjs
- 一键启动器收进 scripts/:start-headless.cmd、start-dev.cmd
- 运行器配置独立成 config/runner.config.mjs(日常调参不用重新 build)
- 真机测试收进 dev/tests/:real-cdp / real-test / real-e2e / real-run
- 运行报告改成 ASCII 名并移入 docs/reports/run-report-v203.md
- v2.0.x 时期的 7 份原始抓取片段归档到 docs/archive/v2.0-snapshots/,
  docs/evidence/ 只留当前版本的有效证据
- 测试每次重新生成的 3 张截图(e2e-01-after-login、e2e-02-playing、
  real-chrome-login)移出仓库并加入 .gitignore,改写到 .run-tmp/screenshots/;
  docs/screenshots/ 只保留手工挑选的 5 张展示图

路径修正:build.mjs 的 ROOT 上跳一级;dev/tests/ 四个脚本 ROOT 上跳两级、
对 runner/browser.mjs 的引用改 ../../;runner/config.mjs 默认配置文件路径改
config/runner.config.mjs;两个 .cmd 的 cd 改为仓库根、start-dev.cmd 指向
dev/serve.mjs;package.json 全部 npm scripts 同步;README、dev/README、证据
文件与源码注释里的路径一并更新。

顺带修掉测试里硬编码的 v2.7.0 断言:版本号改为从 package.json 读取。

验证:npm run build(104798 字节 / 102.3 KB)、npm run check(24/24)、
npm run test:real:headless(24/24 通过)。
2026-10-25 23:21:59 +08:00

25 lines
811 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "yun-xue-tang-assistant",
"version": "2.8.0",
"private": true,
"description": "云学堂(*.yunxuetang.cn)Tampermonkey 助手:自动登录、顺序听课、自动切节、批量刷课",
"scripts": {
"build": "node scripts/build.mjs",
"build:watch": "node scripts/build.mjs --watch",
"dev": "node dev/serve.mjs",
"check": "node scripts/check.mjs",
"test:real": "node dev/tests/real-test.mjs",
"test:real:headless": "node dev/tests/real-test.mjs --headless",
"test:e2e": "node dev/tests/real-e2e.mjs",
"test:e2e:play": "node dev/tests/real-e2e.mjs --play",
"headless": "node runner/headless.mjs",
"headless:check": "node runner/headless.mjs --check"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"esbuild": "^0.28.2"
}
}