start-package

Installation
SKILL.md

npm-package-starter

Scaffolds a publishable TypeScript library that ships as a dual ESM + CJS package with bundled type declarations and (optionally) zero runtime dependencies, using the exact toolchain that builds cleanly without surprises.

When to use

The user wants to start a new package: "create/scaffold/bootstrap a new npm package / library / packete", "set up a TS package", or they have an empty repo and want the base files.


⚠️ The one rule that prevents the known breakage

Pin TypeScript to 5.x ("typescript": "^5"). Do not install an unpinned typescript — it floats to 6.x and breaks the build.

Why: tsup hardcodes baseUrl: "." when generating .d.ts files (node_modules/tsup/dist/rollup.js). TypeScript 6.0 turned baseUrl into a removal-bound deprecation that errors (TS5101) unless you set "ignoreDeprecations": "6.0". But editors bundle their own (often older) TypeScript that doesn't recognize the value "6.0" → permanent red squiggle in the IDE even though the CLI build passes. Staying on TS 5.x sidesteps the whole thing: no flag needed, clean in both CLI and editor.

Revisit TS 6+ only once tsup stops injecting baseUrl. Until then: TS 5.x.

Also pin the editor to the workspace TypeScript via .vscode/settings.json (included below) so the IDE and CLI always use the same compiler.

Installs
4
Repository
bastndev/skills
GitHub Stars
2
First Seen
3 days ago
start-package — bastndev/skills