1.0.2 • Published 6 years ago
project-version-cli v1.0.2
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 npm@5.2.0
npx project-version
// before npm@5.2.0
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.