Skip to content

Add build flag injector and mark-build CLI#24

Merged
mariojgt merged 1 commit into
mainfrom
feat/prod-flag
Jun 25, 2026
Merged

Add build flag injector and mark-build CLI#24
mariojgt merged 1 commit into
mainfrom
feat/prod-flag

Conversation

@mariojgt

Copy link
Copy Markdown
Contributor

Add src/buildFlag.ts implementing markProductionBuild which injects a small <script>window.PATCHSTACK_PROD=true</script> snippet into built HTML files (auto-detects common build dirs: dist, build, out, .output/public; searches nested HTML up to depth 3; skips files already marked). Add a new CLI command mark-build (with --dir option) and runMarkBuild handler to call the injector; the command logs results and intentionally never fails the build if no output or HTML is found. Also update package.json version to 0.2.6.

Add src/buildFlag.ts implementing markProductionBuild which injects a small <script>window.__PATCHSTACK_PROD__=true</script> snippet into built HTML files (auto-detects common build dirs: dist, build, out, .output/public; searches nested HTML up to depth 3; skips files already marked). Add a new CLI command `mark-build` (with --dir option) and runMarkBuild handler to call the injector; the command logs results and intentionally never fails the build if no output or HTML is found. Also update package.json version to 0.2.6.
@mariojgt

Copy link
Copy Markdown
Contributor Author

/review

@coderbuds

coderbuds Bot commented Jun 25, 2026

Copy link
Copy Markdown

Build flag injector and CLI added with clear structure and naming.

🎯 Quality: 88% Excellent · 📦 Size: Medium

📈 This month: Your 91st PR — above team average · Averaging Elite

See how your team is trending →

@mariojgt mariojgt merged commit ebac6a1 into main Jun 25, 2026
4 checks passed
@mariojgt mariojgt deleted the feat/prod-flag branch June 25, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants