This document explains all npm scripts in the root package.json.
| Script | Purpose |
|---|---|
pnpm bootstrap |
First-time setup |
pnpm dev |
Development mode |
pnpm build |
Build all packages |
pnpm test |
Run all tests |
pnpm lint |
Lint all packages |
pnpm typecheck |
Type-check all packages |
pnpm verify |
Run lint + typecheck + test + build |
pnpm format |
Format all files with Prettier |
pnpm clean |
Remove build artifacts |
First-time repository setup.
pnpm bootstrapRuns scripts/bootstrap/cold-start.mjs:
- Checks Node.js version (requires >= 22)
- Checks pnpm version (requires 10.30.2)
- Optionally prompts for local npm authentication
- Optionally configures Turbo remote cache with Vercel
- Syncs Turbo cache settings to GitHub (
TURBO_TEAMvariable andTURBO_TOKENsecret) - Prints npm trusted publishing setup guidance (per package)
- Installs dependencies
- Runs workspace verification (
pnpm setup:verify)
Run this after cloning the repository.
Diagnose setup issues.
pnpm bootstrap:doctorRuns prerequisite checks without installing. Use when bootstrap fails.
setupis an alias forbootstrapsetup:verifyruns full validation: typecheck, lint, build, test, then verify:release
Start development mode.
pnpm devRuns turbo run dev with watch mode enabled. Packages rebuild on file changes.
Build all packages.
pnpm buildRuns turbo run build. Outputs go to each package's dist/ directory.
Remove build artifacts.
pnpm cleanRuns turbo run clean. Removes dist/, .turbo/, node_modules/, etc.
Lint all packages.
pnpm lintRuns ESLint across the workspace. Automatically fixes fixable issues.
Type-check all packages.
pnpm typecheckRuns tsc --noEmit in each package. Reports type errors without emitting files.
Run all tests.
pnpm testRuns Vitest in each package.
Run tests with coverage.
pnpm test:coverageGenerates coverage reports in generated/test-coverage/.
Run lint, typecheck, test, and build together.
pnpm verifyEquivalent to:
pnpm turbo run typecheck lint test build --continueThe --continue flag runs all tasks even if one fails, so you see all errors at once.
Format all files.
pnpm formatRuns Prettier on TypeScript, JSON, and Markdown files.
Verify packages are ready for release.
pnpm verify:releaseRuns release verification across all workspace packages:
- For every package: runs typecheck, lint:check, test, and build release gates
Validate documentation.
pnpm docs:validateRuns scripts/docs/validate-usage-guides.mjs:
- Checks each package has a usage guide
- Validates documentation structure
Publish packages to npm.
pnpm releaseRuns changeset publish. For brand-new packages, this initial publish is token-based and may require OTP.
Configure git hooks.
# Runs automatically on pnpm install
pnpm prepareSets core.hooksPath to .githooks/ so commitlint runs on commits.
Each package has its own scripts. Common patterns:
| Script | Purpose |
|---|---|
build |
Build the package |
dev |
Watch mode |
test |
Run tests |
test:coverage |
Tests with coverage |
lint |
Lint the package |
typecheck |
Type-check |
clean |
Remove artifacts |
Use Turbo's filter:
# Test only utils
pnpm turbo run test --filter=@reasonabletech/utils
# Build only config packages
pnpm turbo run build --filter=@reasonabletech/config-*Or run directly in the package:
cd packages/utils
pnpm test