0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-13 22:48:31 -05:00
verdaccio/tools/getPackageVersion.js

10 lines
217 B
JavaScript
Raw Normal View History

2018-01-29 01:28:03 +08:00
import fs from 'fs';
import path from 'path';
export default function getPackageVersion() {
let packageJSON = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')));
return packageJSON.version;
}