mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
PR #273 메인테이너 리뷰(REQUEST CHANGES) 대응입니다. - highlight.js 벤더링: engine/lib/에 v11 common 빌드 + github/github-dark 테마 CSS를 두어 완전 오프라인에서 동작. template.html과 두 샘플 index.html의 CDN 링크 제거. - 브랜딩 옵션화: injectFooter()를 data-footer-* 속성 기반으로 변경. 기본 OFF, <body data-footer-credit/github/linkedin>로 활성화, data-footer="off"로 명시적 비활성화. 두 샘플에서 baekenough attribution 제거. - 4:3 문구 수정: docs/features의 "자동 조정" 약속 제거, 작성 가이드로 다듬음. 엔진은 stage 비율 축소만 담당. - 샘플 engine drift 방지: scripts/check-sample-sync.sh 추가, canonical engine과 sample 복사본을 cmp로 비교.
41 lines
1.1 KiB
Bash
Executable file
41 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# html-presentation sample engine sync checker
|
|
# Verifies that samples/*/engine/ matches the canonical engine/
|
|
set -euo pipefail
|
|
|
|
SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
CANONICAL="$SKILL_DIR/engine"
|
|
SAMPLES_DIR="$SKILL_DIR/samples"
|
|
|
|
if [ ! -d "$CANONICAL" ]; then
|
|
echo "ERROR: canonical engine not found at $CANONICAL" >&2
|
|
exit 1
|
|
fi
|
|
|
|
EXIT_CODE=0
|
|
|
|
for sample_engine in "$SAMPLES_DIR"/*/engine; do
|
|
[ -d "$sample_engine" ] || continue
|
|
sample_name="$(basename "$(dirname "$sample_engine")")"
|
|
|
|
# Compare each file in canonical against the sample copy
|
|
while IFS= read -r -d '' canonical_file; do
|
|
rel_path="${canonical_file#$CANONICAL/}"
|
|
sample_file="$sample_engine/$rel_path"
|
|
if [ ! -f "$sample_file" ]; then
|
|
echo "MISSING in $sample_name: $rel_path" >&2
|
|
EXIT_CODE=1
|
|
continue
|
|
fi
|
|
if ! cmp -s "$canonical_file" "$sample_file"; then
|
|
echo "DRIFT in $sample_name: $rel_path" >&2
|
|
EXIT_CODE=1
|
|
fi
|
|
done < <(find "$CANONICAL" -type f -print0)
|
|
done
|
|
|
|
if [ $EXIT_CODE -eq 0 ]; then
|
|
echo "all samples in sync with canonical engine"
|
|
fi
|
|
|
|
exit $EXIT_CODE
|