b4push
Run comprehensive pre-push validation covering code quality, builds, tests, 404 checking, and full e2e tests against production build. Use when: (1) Completing a PR or feature implementation, (2) Befo...
Before Push Check
Run pnpm b4push from the project root. Executes scripts/run-b4push.sh which runs all checks in order:
- Port cleanup - Kill processes on ports 34434 and 9000
- Code quality checks - typecheck + lint + format
- Clean build directories
- Unit tests - jest suite
- Production build - includes metadata, sitemap, RSS, search indexing
- E2E image setup - symlink static images to out/
- Start production server - python3 http.server on port 9000
- 404 checker - verify all pages are accessible
- Full E2E test suite - Playwright against production build
- Stop server and cleanup
Takes ~3-4 minutes. All steps must pass.
On failure
- Read the failure output to identify which step failed
- Auto-fix what you can:
- Formatting:
pnpm run format:fix - Lint:
pnpm run lint:fix - E2e failures: analyze screenshots/traces in
test-results/
- Re-run
pnpm b4pushto confirm all checks pass - Report the final status