From c11d2d3eda89eae745df765e8f2a9aa5eddc4902 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 3 Mar 2026 15:05:41 -0600 Subject: [PATCH] fix: copy repo README to CLI for npm publishing build-npm.sh now copies the root README.md into cli/ so the npm package page shows the same README as the GitHub repo. release.sh cleans up the copy after publishing during the restore step. Co-Authored-By: Claude Opus 4.6 --- scripts/build-npm.sh | 3 +++ scripts/release.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/scripts/build-npm.sh b/scripts/build-npm.sh index 3c231313..5807bb49 100755 --- a/scripts/build-npm.sh +++ b/scripts/build-npm.sh @@ -58,6 +58,9 @@ echo " [5/6] Generating publishable package.json..." cp "$CLI_DIR/package.json" "$CLI_DIR/package.dev.json" node "$REPO_ROOT/scripts/generate-npm-package-json.mjs" +# Copy root README so npm shows the repo README on the package page +cp "$REPO_ROOT/README.md" "$CLI_DIR/README.md" + # ── Step 6: Summary ─────────────────────────────────────────────────────────── BUNDLE_SIZE=$(wc -c < "$DIST_DIR/index.js" | xargs) echo " [6/6] Build verification..." diff --git a/scripts/release.sh b/scripts/release.sh index 62a79cbd..169a84b4 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -178,6 +178,11 @@ if [ -f "$CLI_DIR/package.dev.json" ]; then echo " ✓ Restored workspace dependencies in cli/package.json" fi +# Remove the README copied for npm publishing +if [ -f "$CLI_DIR/README.md" ]; then + rm "$CLI_DIR/README.md" +fi + # Commit all changes git add -A git commit -m "chore: release v$NEW_VERSION"