mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
41cbbea00c
- Split components.json: índice sin content (1.9 MB / 249 KB br vs 15.6 MB / 4.15 MB br).
Generador produce component-content/{type}/{slug}.json por componente y auto-copia
a dashboard/public/. Página de detalle carga contenido on-demand via fetchComponentContent().
- Restaurar cabeceras de caché y seguridad perdidas en la migración Vercel→Cloudflare:
_headers con Cache-Control max-age=86400 para JSONs, immutable para _astro/*,
y HSTS, X-Frame-Options, Referrer-Policy, Permissions-Policy en todas las rutas.
- Eliminar dashboard/vercel.json (config muerta desde migración a Cloudflare Pages).
- Diferir hidratación: ClerkIsland y AuthButton client:load → client:idle;
SaveToCollectionButton → client:visible.
- Eliminar gpt-tokenizer del bundle del navegador: reemplazado por estimación chars/4.
- Actualizar .claude/rules/dashboard.md para reflejar hosting en Cloudflare Pages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 line
1.3 KiB
JSON
1 line
1.3 KiB
JSON
{"content": "{\n \"description\": \"Smart code formatting based on file type. Automatically formats code using Prettier, Black, gofmt, rustfmt, and other language-specific formatters.\",\n \"hooks\": {\n \"PostToolUse\": [\n {\n \"matcher\": \"Edit|MultiEdit\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"if [[ \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.js || \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.ts || \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.jsx || \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.tsx || \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.json || \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.css || \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.html ]]; then npx prettier --write \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null || true; elif [[ \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.py ]]; then black \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null || true; elif [[ \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.go ]]; then gofmt -w \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null || true; elif [[ \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.rs ]]; then rustfmt \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null || true; elif [[ \\\"$CLAUDE_TOOL_FILE_PATH\\\" == *.php ]]; then php-cs-fixer fix \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null || true; fi\"\n }\n ]\n }\n ]\n }\n}"} |