chore: Claude Code 설정·디자인 레퍼런스·포털 로고 추가

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyemin Lee
2026-06-29 17:11:41 +09:00
parent d889a8516f
commit caa56f72dc
5 changed files with 2500 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
// PostToolUse 훅: Edit/Write 직후 편집된 .js 파일을 `node --check` 로 문법 검증한다.
// 비-개발 사용자가 Claude 의 편집 중 깨진 JS 를 바로 발견·수정할 수 있도록 돕는다.
//
// 입력: stdin 으로 훅 페이로드 JSON (tool_input.file_path 사용).
// 종료코드: 0 = 통과/대상 아님, 2 = 문법 오류(stderr 가 Claude 에게 피드백됨).
import { execFileSync } from "node:child_process";
let raw = "";
process.stdin.on("data", (c) => (raw += c));
process.stdin.on("end", () => {
let file;
try {
file = JSON.parse(raw || "{}")?.tool_input?.file_path;
} catch {
process.exit(0); // 페이로드 파싱 실패는 조용히 통과
}
if (!file || !file.endsWith(".js")) process.exit(0);
try {
execFileSync(process.execPath, ["--check", file], { stdio: "pipe" });
} catch (e) {
const msg = (e.stderr || e.stdout || e.message || "").toString();
console.error(`✗ JS 문법 오류 (${file}):\n${msg}`);
process.exit(2);
}
process.exit(0);
});

15
.claude/settings.json Normal file
View File

@@ -0,0 +1,15 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/check-js.mjs\""
}
]
}
]
}
}