Install locally by running the following commands
npm run refresh
The scripts
section of the scriptrepo
package.json file includes pre, post and other version commands. Simply by running npm version <patch|minor|major>
a new version will be created and a new commit and tags will be created and pushed to the remote branch.
{
"preversion": "npm run lint",
"version": "genversion --semi version.js && git add version.js",
"postversion": "npm run --silent tag:update-latest && git push -u origin $(git rev-parse --abbrev-ref HEAD) && git push --follow-tags",
"version:current": "echo $npm_package_version",
"version:latest-published": "npm view scriptrepo version"
}
npm version patch
npm version minor
npm version major