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.
npm version prereleaseto tag a version as prerelease.
npm publish --tag betato 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]