One sentence: the pain, then the fix.
import { clamp } from 'PACKAGE_NAME/example'
clamp(15, 0, 10) // 10npm install PACKAGE_NAMEWorks in Node 20+, Bun, Deno and browsers. ESM and CommonJS, fully typed, zero dependencies.
| PACKAGE_NAME | alternative-a | alternative-b | |
|---|---|---|---|
| Zero dependencies | ✅ | ||
| Size (min+gzip) |
MIT © nightlightmare
- On GitHub: Use this template → name the repo after the npm package.
- Replace
PACKAGE_NAMEandPACKAGE_DESCRIPTIONacross the repo; fillkeywords. - Rename
src/example/to your first module and updateexports,size-limitandtsdown.config.ts. - Update the per-subpath checks in
scripts/smoke.mjs. pnpm install && pnpm coverage && pnpm build && pnpm smoke && pnpm check:publish && pnpm size- npmjs.com → package → Settings → Trusted Publisher: GitHub Actions, this repo, workflow
release.yml. - When the first release is ready, remove
"private": truefrompackage.json. Until then the release workflow publishes nothing. - Create the triage labels:
for l in needs-triage needs-info ready-for-agent ready-for-human wontfix; do gh label create $l; done