Files
yun-xue-tang-assistant/package.json
T
void 8193326b70 refactor: 拆分 src/ 模块并接入 esbuild 构建
把单文件脚本拆成 src/ 下 13 个 ES 模块,用 esbuild 打回同名 .user.js,
产物文件名不变,dev/ 热加载链路无需改动。

- build.mjs:esbuild 打包(--watch / --minify),版本号只从 package.json
  读取,同时替换 meta.js 的 @version 与 config.js 的 VERSION
- 统一版本号来源,消除 package.json / meta.js / config.js 三处手写
- 补回 'use strict'(esbuild IIFE 默认不带,属真实行为回归)
- 清理重复实现:pauseAllMedia、listData、shortQuery、drain、clearPending、
  cbAuto 模块级引用、共用 cssText
- 去掉搬代码时残留的 IIFE 缩进、死字段、二次兜底默认值、过期注释
- README / dev/README 同步构建流程与目录结构

行为无变化,仅 src/config.js 的 CFG 改成构建期注入版本号。
2026-10-24 22:45:27 +08:00

19 lines
585 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.7.0",
"private": true,
"description": "云学堂(*.yunxuetang.cn)Tampermonkey 助手:自动登录、顺序听课、自动切节、批量刷课",
"scripts": {
"build": "node build.mjs",
"build:watch": "node build.mjs --watch",
"dev": "node dev/serve.mjs",
"check": "node --check yun-xue-tang-assistant.user.js && node --check dev/dev-loader.user.js && node --check dev/serve.mjs && node --check build.mjs"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"esbuild": "^0.28.2"
}
}