package-version-manifest
v1.3.0
Published
Simple CLI to generate package version manifests
Readme
package-version-manifest
Simple CLI to generate package version manifests
Installation
yarn add --dev package-version-manifestUsage
Basic example
yarn -s package-version-manifest [version]By default, the version is printed out in the following format:
major=<x>
major=<y>
major=<z>
pre=[<pre1>.<pre2> ...]This format is useful for loading as environment variables in Bash.
If no version is specified, the package version defined in package.json is
used.
Writing to a file
yarn -s package-version-manifest > manifest.iniLoading as environment variables in Bash
source <(yarn -s package-version-manifest)
echo "Package version: $major.$minor.$patch (${pre:-final})"Output formats
yarn -s package-version-manifest -o jsonThe version is then printed in JSON:
{"major":<x>,"minor":<y>,"patch":<z>,"pre":"<pre1>.<pre2> ..."}Extracting only the major, minor, patch version or pre-release suffix
yarn -s package-version-manifest -o major
yarn -s package-version-manifest -o minor
yarn -s package-version-manifest -o patch
yarn -s package-version-manifest -o pre