feat(build): Add prepare script for GitHub-based npm install#1053
feat(build): Add prepare script for GitHub-based npm install#1053
Conversation
Enable building repomix when installed directly from GitHub repository. The prepare script runs `npm run build` which is triggered when: - Installing from GitHub (e.g., `npm install github:yamadashy/repomix#main`) - Running `npm install` locally for development This does not affect npm registry installs since the published tarball already includes the pre-built lib/ directory.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughAdded a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @yamadashy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a prepare script to package.json to enable building the project when installed directly from a GitHub repository. This is a well-reasoned change that correctly uses the prepare npm lifecycle script to improve the developer experience for users who need to install the package from a git source. The implementation is simple, correct, and I have no suggestions for improvement.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1053 +/- ##
=======================================
Coverage 90.34% 90.34%
=======================================
Files 123 123
Lines 9457 9457
Branches 1709 1709
=======================================
Hits 8544 8544
Misses 913 913 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Deploying repomix with
|
| Latest commit: |
5e194e1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://06ceeee7.repomix.pages.dev |
| Branch Preview URL: | https://feat-add-prepare-script.repomix.pages.dev |
Code Review SummaryOverall Assessment: ✅ This PR looks good and is ready to merge. Changes ReviewedThe PR adds a single line to "prepare": "npm run build"AnalysisPurpose & Correctness:
Why this is safe:
Premortem Analysis
RecommendationsNone - this is a clean, minimal change that follows npm best practices. Checklist
🤖 Generated with Claude Code |
Add --ignore-scripts to npm ci --omit=dev to prevent prepare script from running, which would fail due to missing devDependencies (rimraf).
Code Review SummaryOverall Assessment: ✅ This PR is well-implemented and ready to merge. Changes Overview
Analysis1. The The
2. CI Fix (ci.yml:230) The - run: npm ci --omit=dev
+ run: npm ci --omit=dev --ignore-scriptsWithout this flag, Code Quality
Premortem Analysis
VerdictNo issues found. The implementation correctly uses npm lifecycle hooks and the CI fix properly handles the edge case with production-only installs. 🤖 Generated with Claude Code |
The `prepare` script (`npm run build`) added in #1053 causes the Docker build to fail because `npm ci --omit=dev` triggers it without devDependencies (`rimraf`, `tsc`) being available. Adding `--ignore-scripts` skips the unnecessary rebuild since the build output already exists from the prior step. Docker builds have been broken since 2025-12-31 (PR #1053). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable building repomix when installed directly from GitHub repository.
Changes
preparescript that runsnpm run buildWhy
This allows the website server (and other projects) to install repomix directly from GitHub's main branch:
The
preparescript is triggered when:npm install github:yamadashy/repomix#main)npm installlocally for developmentnpm publish(ensures fresh build)This does not affect npm registry installs since the published tarball already includes the pre-built
lib/directory.Checklist
npm run testnpm run lint