Npm package template

Hi all, What is a modern template for creating a npm package these days In the past I’ve used tsdx but that isn’t maintained anymore
4 Replies
Aarvin Roshin
Aarvin Roshin4d ago
It's not exactly a template, but I typically use unbuild for the build system.
GitHub
GitHub - unjs/unbuild: 📦 A unified JavaScript build system
📦 A unified JavaScript build system. Contribute to unjs/unbuild development by creating an account on GitHub.
zebwd
zebwd4d ago
I wrote an article about it a while ago, it has an example repo Basically using tsup for simple packages and rollup for React and complex use cases https://dev.to/wdsebastian/simplest-way-to-publish-and-automate-npm-packages-d0c
DEV Community
Auto publish NPM packages using changesets and GitHub Actions
For this guide we will be publishing a simple NPM typescript package called...
peculiarnewbie
The answers above looks good. But i also wanna add that bun has built in commands for packaging and publishing https://bun.sh/docs/cli/publish
Bun
bun publish – Package manager | Bun Docs
Publish your package to an npm registry.
WOLFLEADER
WOLFLEADEROP3d ago
Awesome thank you guys! Started going down the rabbit hole of tsup before you sent this - amazing article btw!

Did you find this page helpful?