chore(spec): 归档 blog-5l——三任务收敛(预览一致性/排版提醒/瞬间置顶隐藏)
Spec: 2026-11-05_blog-5l-admin-preview-moments Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
c5889f960b
commit
b99e6e744b
17 files changed
+406
-17
No files matched your search
@@ -0,0 +1,17 @@
|
||||
#!/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"
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# task_0002 编辑提醒:hint 速查 ≥3 处 + config-check 通过 + 文档节
|
||||
set -euo pipefail
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
export PATH="$HOME/.local/node/bin:$PATH"
|
||||
python3 scripts/build-perf/config-check.py . | grep -q "全部通过"
|
||||
[ "$(grep -c 'Insert ▸ 排版' public/admin/config.yml)" -ge 3 ]
|
||||
grep -q "预览窗格直接显色/显字体" docs/管理台.md
|
||||
echo "verify_t2 OK"
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# task_0003 瞬间置顶/隐藏:schema/排序过滤/后台开关/徽标/E2E
|
||||
set -euo pipefail
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
export PATH="$HOME/.local/node/bin:$PATH"
|
||||
grep -q "pinned: z.boolean().optional()" src/content.config.ts
|
||||
grep -q "hidden" src/components/pages/MomentsPage.astro
|
||||
grep -q "name: pinned, widget: boolean" public/admin/config.yml
|
||||
grep -q "name: hidden, widget: boolean" public/admin/config.yml
|
||||
pnpm astro build >/dev/null 2>&1
|
||||
grep -q 'class="pin"' dist/moments/index.html
|
||||
nohup python3 scripts/build-perf/gz-server.py 18925 "$PWD/dist" >/tmp/gz-5l.log 2>&1 &
|
||||
SRV=$!
|
||||
sleep 2
|
||||
trap 'kill $SRV 2>/dev/null || true' EXIT
|
||||
E2E_BASE=http://127.0.0.1:18925 node tests/e2e.mjs 2>&1 | grep -q "59/59 PASS"
|
||||
echo "verify_t3 OK"
|
||||
Reference in new issue
Block a user