chore: relocate mirror under fn_registry/subrepos/
Update sync script to auto-detect registry root when nested inside fn_registry/subrepos/. Update README to reflect new location. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# fn-design-system
|
||||
|
||||
**Read-only mirror of `@fn_library`** — the React 19 + Mantine v9 design system that lives inside [fn_registry](../fn_registry).
|
||||
**Read-only mirror of `@fn_library`** — the React 19 + Mantine v9 design system that lives inside [fn_registry](../..).
|
||||
|
||||
This repo is checked out at `fn_registry/subrepos/fn-design-system/` (gitignored by fn_registry so it keeps its own git history and remotes).
|
||||
|
||||
This repo exists for one purpose: **give Claude Design (and other external tools) a clean, minimal view of the design system** without exposing the rest of the monorepo.
|
||||
|
||||
@@ -42,7 +44,7 @@ git commit -m "sync: <what changed>"
|
||||
git push
|
||||
```
|
||||
|
||||
The script requires `FN_REGISTRY_ROOT` to point at your local fn_registry clone (defaults to `~/fn_registry`).
|
||||
The script auto-detects the fn_registry root when the mirror lives at `fn_registry/subrepos/fn-design-system/`. Override with `FN_REGISTRY_ROOT=/path/to/fn_registry` if needed.
|
||||
|
||||
## What is NOT in this repo
|
||||
|
||||
|
||||
+16
-3
@@ -6,13 +6,24 @@
|
||||
# fn_registry/frontend/package.json (filtered) → package.json (not overwritten)
|
||||
#
|
||||
# Usage:
|
||||
# FN_REGISTRY_ROOT=~/fn_registry ./sync_from_registry.sh
|
||||
# ./sync_from_registry.sh # uses default ~/fn_registry
|
||||
# ./sync_from_registry.sh # auto-detects when inside fn_registry/subrepos/
|
||||
# FN_REGISTRY_ROOT=/path/to/fn_registry ./sync_from_registry.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
MIRROR_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-$HOME/fn_registry}"
|
||||
|
||||
# Resolve fn_registry root:
|
||||
# 1. $FN_REGISTRY_ROOT if set
|
||||
# 2. two levels up from script (mirror at fn_registry/subrepos/fn-design-system/)
|
||||
# 3. $HOME/fn_registry as last resort
|
||||
if [[ -n "${FN_REGISTRY_ROOT:-}" ]]; then
|
||||
REGISTRY_ROOT="$FN_REGISTRY_ROOT"
|
||||
elif [[ -d "$MIRROR_ROOT/../../frontend/functions/ui" ]]; then
|
||||
REGISTRY_ROOT="$(cd "$MIRROR_ROOT/../.." && pwd)"
|
||||
else
|
||||
REGISTRY_ROOT="$HOME/fn_registry"
|
||||
fi
|
||||
|
||||
if [[ ! -d "$REGISTRY_ROOT/frontend/functions/ui" ]]; then
|
||||
echo "ERROR: $REGISTRY_ROOT/frontend/functions/ui not found." >&2
|
||||
@@ -20,6 +31,8 @@ if [[ ! -d "$REGISTRY_ROOT/frontend/functions/ui" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "→ Registry root: $REGISTRY_ROOT"
|
||||
|
||||
SRC_UI="$REGISTRY_ROOT/frontend/functions/ui"
|
||||
SRC_DOC="$REGISTRY_ROOT/frontend/DESIGN_SYSTEM.md"
|
||||
DST_UI="$MIRROR_ROOT/components"
|
||||
|
||||
Reference in New Issue
Block a user