A personal template repository by C. Spencer Beggs for developing and publishing Node.js modules to npm and GitHub Packages.
You're welcome to clone or fork this template for your own use.
- Build pipeline — Dual-output builds (development + production) via
Rslib with automatic
package.jsontransformation for publishing - Code quality — Biome for linting and formatting, with git hooks for pre-commit checks and commit message validation
- Testing — Vitest with v8 coverage
- Versioning — Changesets for version management and changelog generation
- CI/CD — GitHub Actions for automated testing, building, and publishing with provenance attestation
- TypeScript — Strict mode, composite builds, ESM-first with
.jsimport extensions
-
Click "Use this template" on GitHub (or clone the repo directly)
-
Update
package.jsonwith your package name, repository URL, and homepage -
Update the
repofield in.changeset/config.json -
Replace the placeholder code in
src/with your own -
Install dependencies:
pnpm install
-
Start developing:
pnpm run test:watch # Run tests in watch mode pnpm run lint:fix # Auto-fix lint issues pnpm run build # Build dev + prod outputs
src/ Source code and tests
lib/configs/ Shared tool configurations (commitlint, lint-staged, markdownlint)
dist/dev/ Development build output
dist/npm/ Production build output (published to registries)
.github/workflows/ CI/CD workflows
.changeset/ Changeset configuration
Packages are published to both npm and GitHub Packages with provenance
attestation. The build pipeline automatically transforms package.json for
publishing — the source file stays "private": true and the builder handles the
rest.
See the Changesets documentation for how versioning and releases work.
This template includes configuration for Claude Code. See CLAUDE.md for details on the design-first development workflow.