0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/tools/getPackageVersion.js
2018-01-29 01:32:13 +08:00

9 lines
217 B
JavaScript

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;
}