publish-if-needed
Publish npm package if
- Current branch is
master
- Version in
package.json
is greater than the published one
Install
npm i publish-if-needed
Usage
# Increment package.json version
npm version patch
# Publish version if needed
npx publish-if-needed
Programmatic API
const publishIfNeeded = require('publish-if-needed')
publishIfNeeded()