Publish a npm package to beta
24 Jan 2021 1 min
Recently, I was writing one small npm package library for myself and I need to publish it as a beta for testing purpose. Although, we can test it locally using npm link
, here’s how we can publish beta version of npm package.
- Build your distribution packages for beta publication.
- Run
npm version prerelease
to tag a version as prerelease. - run
npm publish --tag beta
to publish it as beta.
Here are two options for install:
- Always install beta with npm install packagename@beta
- Install specific version with npm install [email protected]