18 lines
975 B
Bash
18 lines
975 B
Bash
#!/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"
|