chore: 动画盘点判据接入套件 + 让其合规 + 对齐参照物重新登记(清工程收尾)
用户:「清理一下tmp和工程吧」。 - 新判据 test/animation-audit.test.mjs 接入 test/run-all.mjs:原先**写了却不会跑** (套件自带的那条闸门当场报「这些判据文件没接进套件」)。 - 该文件改用 test/lib/read.mjs 的具名入口(code/prose/bytes),不再裸用 readFileSync —— criteria-hygiene 抓到:读原文判代码会被解释性注释骗,今天已踩过两次。 - docs/ALIGN-REFS.json:CalendarView 的对齐登记按规矩**重新核对后再登记** (差异只有动画类 rise-in → pane-rise,骨架/布局/圆角来源未变;鸿蒙侧本无日历动效 ⇒ 不产生新的对齐义务),不是抄一处新哈希。
This commit is contained in:
@ -22,25 +22,25 @@
|
||||
* 3. 不得再出现"整档控件一起动"的 view-switch 规则(③)。
|
||||
* 4. 挂载即播那档(.rise-in)必须被 prefers-reduced-motion 显式关掉。
|
||||
*/
|
||||
import { readdirSync, readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { readdirSync } from 'node:fs';
|
||||
import { check, finish } from './lib/checks.mjs';
|
||||
import { code } from './lib/read.mjs';
|
||||
|
||||
const HERE = fileURLToPath(new URL('.', import.meta.url));
|
||||
const css = readFileSync(join(HERE, '..', 'src', 'index.css'), 'utf8').replace(/\/\*[\s\S]*?\*\//g, '');
|
||||
// 判"规则/代码里有没有这个东西"一律走剥注释版(code):解释性注释里会原样引用被禁的写法,
|
||||
// 读原文会把它当成"还在用"(criteria-hygiene 就是这么抓到本文件第一版裸用 readFileSync 的)。
|
||||
const css = code('src/index.css');
|
||||
|
||||
/** 组件源码全文:判"这个类有没有人穿"必须看代码,不是看我们的记忆 */
|
||||
function componentsSrc() {
|
||||
const out = [];
|
||||
const walk = dir => {
|
||||
for (const e of readdirSync(dir, { withFileTypes: true })) {
|
||||
const p = join(dir, e.name);
|
||||
const p = `${dir}/${e.name}`;
|
||||
if (e.isDirectory()) walk(p);
|
||||
else if (/\.tsx?$/.test(e.name) && !/\.test\./.test(e.name)) out.push(readFileSync(p, 'utf8'));
|
||||
else if (/\.tsx?$/.test(e.name) && !/\.test\./.test(e.name)) out.push(code(p));
|
||||
}
|
||||
};
|
||||
walk(join(HERE, '..', 'src'));
|
||||
walk('src');
|
||||
return out.join('\n');
|
||||
}
|
||||
const src = componentsSrc();
|
||||
|
||||
@ -61,6 +61,7 @@ const SUITE = [
|
||||
['test/markdown-xss.test.mjs', [], 9],
|
||||
['test/narrow-layout.test.mjs', [], 64],
|
||||
['test/nav-merge.test.mjs', [], 8],
|
||||
['test/animation-audit.test.mjs', [], 4], // 动画全量盘点:死动画/过宽作用域/弹层接线/reduced-motion
|
||||
['test/theme.test.mjs', [], 30],
|
||||
['test/background.test.mjs', [], 42],
|
||||
['test/cross-client-theme.test.mjs', [], 15],
|
||||
|
||||
Reference in New Issue
Block a user