1.0.3 • Published 2 years ago
print-project-version v1.0.3
print-project-version
Print formatted project version from the package.json
This is a small utility meant to be used on CI scripts. It will print the version coming from the project package.json
.
Compared to other similar utilities, you can format the way you print the version, or only print a part of it. This is expecially useful when you automatically generate patch versions on your CI and you don't want to use console utilities.
Examples.
npx print-project-version # prints 1.2.3
npx print-project-version minor # prints 2
npx print-project-version minor.patch # prints 2.3
npx print-project-version major.minor. # prints 1.2.