Update version reading
This commit is contained in:
parent
66e84ba6bb
commit
23743993a9
6
index.js
6
index.js
|
@ -3,5 +3,9 @@ exports.AbstractClass = require('./lib/abstract-class').AbstractClass;
|
||||||
exports.Validatable = require('./lib/validatable').Validatable;
|
exports.Validatable = require('./lib/validatable').Validatable;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
exports.version = require('./package.json').version;
|
if (process.versions.node < '0.6' || true) {
|
||||||
|
exports.version = JSON.parse(fs.readFileSync(process.cwd() + '/package.json')).version;
|
||||||
|
} else {
|
||||||
|
exports.version = require('../package').version;
|
||||||
|
}
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
Loading…
Reference in New Issue