project-version-cli
v1.0.2
Published
Get the current version of your project as js lib or via cli call
Downloads
1
Maintainers
Readme
project-version
Get the current version of your project as js lib or via cli call.
Forked from https://github.com/simonepri/project-version
Install
$ npm install --save project-version
JS Usage
const version = require('project-version');
// Caution: console.log outputs newlines, use process.stdout.write to avoid whitespaces
console.log(version);
//=> '1.0.0'
CLI Usage
inside npm scripts
{
"scripts": {
"get-version": "project-version",
"capture-version-for-build-scripts": "echo $(project-version)"
}
}
outside npm scripts
// with [email protected]
npx project-version
// before [email protected]
node ./node_modules/project-version/cli.js
Authors
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.