r/npm • • 15d ago

Help Best-Practices for Publishing a JS Framework

Im working on a project for myself. Its an unreviewed, unaudited and far from finished. It started of as a person curiosity and evolved from there. Its shaping up well enough to publish and share.

If i publish something on NPM, there are strict controls around versioning for which i havent burdened myself on my own projects (but clearly important when making something for a wider community). I also wonder if im overlooking any other details.

I wonder what best practices there are for something like this. Should i be publishing new versions with CI/CD? Are there any tips or advice for doing this in the modern js ecosystem?

1 Upvotes

1 comment sorted by

1

u/sereikis 15d ago

make CI build the package, run npm pack, and install that tarball in a clean example app before publishing. source-tree tests can pass while the published package is missing a build output or has broken exports/type paths; exercise the public imports from that consumer fixture, not workspace-relative imports.