3 ms·
My most commonly used thing in my profile is this combination git tag, push, and npm publish using the current version in my package.json file: np() { PA
by cgijoe 8y ago
My most commonly used thing in my profile is this combination git tag, push, and npm publish using the current version in my package.json file:
np() {
PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
SHORTVER="v$PACKAGE_VERSION"
LONGVER="Version $PACKAGE_VERSION"
echo $LONGVER
git tag -a "$SHORTVER" -m "$LONGVER" && git push --tags && npm publish
}
- 11235813213455 8y agonode -p "require('./package.json').version" no need for -e, or also just: jq -r .version package.json