package-json-parser
v2.2.0
Published
package.json parser
Downloads
4
Readme
package-version
package.json parser.
Install
npm i package-json-parser
Usage
Version
Script:
const packageJson = require('package-json-parser');
const version = packageJson.version();
console.log(version); // version from root directory package.json
const pathToPackageJson = '/foo/bar/package.json'
const fooBarVersion = packageJson.version(pathToPackageJson);
console.log(fooBarVersion); // version from /foo/bar directory package.json
License
MIT © nlapshin