Files
blog/.spec/specs/archive/2026-11-05_blog-5l-admin-preview-moments/evidence/verify_t1.sh
T
wait4xandGLM-5.3 b99e6e744b chore(spec): 归档 blog-5l——三任务收敛(预览一致性/排版提醒/瞬间置顶隐藏)
Spec: 2026-11-05_blog-5l-admin-preview-moments

Co-authored-by: GLM-5.3
2026-11-05 10:03:34 +08:00

18 lines
975 B
Bash
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.
#!/usr/bin/env bash
# task_0001 预览样式注入:三脚本语法 + 注入调用存在 + 接线顺序 + css 字段 + 多类 pattern
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
node --check public/admin/preview-style.js
node --check public/admin/typography-classes.js
node --check public/admin/typography-editor.js
grep -q "registerPreviewStyle" public/admin/preview-style.js
# index.html 接线序:typography-classes → typography-editor → preview-style(CMS 之后)
grep -q 'typography-classes.js"></script>' public/admin/index.html
grep -q 'preview-style.js"></script>' public/admin/index.html
[ "$(grep -c 'fonts.css" />' public/admin/index.html)" -ge 7 ]
# 清单带切片 CSS 字段 ×7(huiwen/xiaowei/huangyou/mashanzheng/liujianmaocao/smiley/neoxihei)
[ "$(grep -c "css: '/fonts/" public/admin/typography-classes.js)" -eq 7 ]
# pattern 放宽到多类(空格)
grep -q '\[a-z0-9- \]' public/admin/typography-editor.js
echo "verify_t1 OK"