When we want to update our package we need to do a few things: pull latest from our git remote, bump the npm version and git tag, push to our remote, push tags to our remote, and then run npm publish
. Phew, that’s a lot. In this lesson, we will set up a release
script using the np
package to simplify this process.
Install:
npm i -D np
Script:
"prepublish": "npm run build",
"release": "np",
It will go though the command line ask for options and release the package.