Initializer for compound 1.1.5-16
This commit is contained in:
parent
8ca6d2e0ba
commit
6f1c9b2034
9
index.js
9
index.js
|
@ -18,10 +18,19 @@ exports.init = function (rw) {
|
||||||
rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass};
|
rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass};
|
||||||
}
|
}
|
||||||
var railway = './lib/railway';
|
var railway = './lib/railway';
|
||||||
|
|
||||||
|
if (rw.version > '1.1.5-15') {
|
||||||
|
rw.on('after routes', initialize);
|
||||||
|
} else {
|
||||||
|
initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
function initialize() {
|
||||||
try {
|
try {
|
||||||
var init = require(railway);
|
var init = require(railway);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
if (init) init(rw);
|
if (init) init(rw);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.__defineGetter__('version', function () {
|
exports.__defineGetter__('version', function () {
|
||||||
|
|
Loading…
Reference in New Issue