[NPM] Update published npm packages using np

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.

posted @ 2017-09-29 02:32  Zhentiw  阅读(164)  评论(0编辑  收藏  举报