feat: add design_prompts/ — 10 ready-to-paste templates
Templates for Claude Design: onboarding, dashboard, crud, detail, settings, auth, error, custom + handoff_integrate (for Claude Code). sync_from_registry.sh now mirrors design_prompts/ too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+16
-4
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sync the design system mirror from fn_registry.
|
||||
# Copies:
|
||||
# fn_registry/frontend/functions/ui/ → components/
|
||||
# fn_registry/frontend/DESIGN_SYSTEM.md → DESIGN_SYSTEM.md
|
||||
# fn_registry/frontend/package.json (filtered) → package.json (not overwritten)
|
||||
# fn_registry/frontend/functions/ui/ → components/
|
||||
# fn_registry/frontend/DESIGN_SYSTEM.md → DESIGN_SYSTEM.md
|
||||
# fn_registry/frontend/design_prompts/ → design_prompts/
|
||||
#
|
||||
# Usage:
|
||||
# ./sync_from_registry.sh # auto-detects when inside fn_registry/subrepos/
|
||||
@@ -35,8 +35,10 @@ echo "→ Registry root: $REGISTRY_ROOT"
|
||||
|
||||
SRC_UI="$REGISTRY_ROOT/frontend/functions/ui"
|
||||
SRC_DOC="$REGISTRY_ROOT/frontend/DESIGN_SYSTEM.md"
|
||||
SRC_PROMPTS="$REGISTRY_ROOT/frontend/design_prompts"
|
||||
DST_UI="$MIRROR_ROOT/components"
|
||||
DST_DOC="$MIRROR_ROOT/DESIGN_SYSTEM.md"
|
||||
DST_PROMPTS="$MIRROR_ROOT/design_prompts"
|
||||
|
||||
echo "→ Syncing components from $SRC_UI"
|
||||
mkdir -p "$DST_UI"
|
||||
@@ -51,7 +53,17 @@ else
|
||||
echo "WARN: $SRC_DOC not found, skipping" >&2
|
||||
fi
|
||||
|
||||
echo "→ Syncing design_prompts/"
|
||||
if [[ -d "$SRC_PROMPTS" ]]; then
|
||||
mkdir -p "$DST_PROMPTS"
|
||||
find "$DST_PROMPTS" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
|
||||
cp -r "$SRC_PROMPTS"/. "$DST_PROMPTS"/
|
||||
else
|
||||
echo "WARN: $SRC_PROMPTS not found, skipping" >&2
|
||||
fi
|
||||
|
||||
# Counts
|
||||
n_tsx=$(find "$DST_UI" -maxdepth 1 -name "*.tsx" | wc -l | tr -d ' ')
|
||||
n_md=$(find "$DST_UI" -maxdepth 1 -name "*.md" | wc -l | tr -d ' ')
|
||||
echo "✓ Done — $n_tsx .tsx + $n_md .md in components/"
|
||||
n_prompts=$(find "$DST_PROMPTS" -maxdepth 1 -name "*.md" 2>/dev/null | wc -l | tr -d ' ')
|
||||
echo "✓ Done — $n_tsx .tsx + $n_md .md in components/ + $n_prompts .md in design_prompts/"
|
||||
|
||||
Reference in New Issue
Block a user