refactor: rename --framework to --platform across all scripts and tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nunziati
2026-04-10 11:50:55 +00:00
parent 9673bca7c2
commit 9a93cd4aa5
7 changed files with 59 additions and 59 deletions

View File

@@ -11,7 +11,7 @@
# .claude/ directory.
#
# Options:
# --framework <name> Framework to build for (default: claude-code)
# --platform <name> Platform to build for (default: claude-code)
# --target <path> Override the vault destination path
# =============================================================================
@@ -24,13 +24,13 @@ source "$SCRIPT_DIR/lib.sh"
resolve_paths "${BASH_SOURCE[0]}"
# ── Parse args ─────────────────────────────────────────────────────────────
FRAMEWORK="claude-code"
PLATFORM="claude-code"
TARGET_OVERRIDE=""
while [[ $# -gt 0 ]]; do
case "$1" in
--framework) FRAMEWORK="$2"; shift 2 ;;
--platform) PLATFORM="$2"; shift 2 ;;
--target) TARGET_OVERRIDE="$2"; shift 2 ;;
*) die "Unknown argument: $1 (use --framework <name> or --target <path>)" ;;
*) die "Unknown argument: $1 (use --platform <name> or --target <path>)" ;;
esac
done
[[ -n "$TARGET_OVERRIDE" ]] && VAULT_DIR="$TARGET_OVERRIDE"
@@ -88,14 +88,14 @@ fi
echo ""
# ── Build the framework dist ───────────────────────────────────────────────
info "Building $FRAMEWORK adapter..."
bash "$SCRIPT_DIR/build.sh" --framework "$FRAMEWORK"
DIST_DIR="$REPO_DIR/dist/$FRAMEWORK"
# ── Build the platform dist ───────────────────────────────────────────────
info "Building $PLATFORM adapter..."
bash "$SCRIPT_DIR/build.sh" --platform "$PLATFORM"
DIST_DIR="$REPO_DIR/dist/$PLATFORM"
[[ -d "$DIST_DIR" ]] || die "Build did not produce $DIST_DIR"
# ── Framework-specific install layout ────────────────────────────────────────
case "$FRAMEWORK" in
# ── Platform-specific install layout ────────────────────────────────────────
case "$PLATFORM" in
claude-code)
DIST_COMPONENTS_DIR="$DIST_DIR/.claude"
VAULT_COMPONENTS_DIR="$VAULT_DIR/.claude"
@@ -115,10 +115,10 @@ case "$FRAMEWORK" in
HAS_PLUGINS=1
;;
*)
die "Unknown framework: $FRAMEWORK (install layout not defined)"
die "Unknown platform: $PLATFORM (install layout not defined)"
;;
esac
FRAMEWORK_VAULT_DIR="$VAULT_COMPONENTS_DIR"
PLATFORM_VAULT_DIR="$VAULT_COMPONENTS_DIR"
# ── Migrate legacy manifests (if any) ────────────────────────────────────────
manifest_migrate
@@ -237,7 +237,7 @@ if [[ $DEP_COUNT -gt 0 ]]; then
fi
echo ""
echo -e " ${BOLD}Next steps:${NC}"
if [[ "$FRAMEWORK" == "opencode" ]]; then
if [[ "$PLATFORM" == "opencode" ]]; then
echo -e " 1. Open opencode in your vault folder"
else
echo -e " 1. Open Claude Code in your vault folder"