-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
46 lines (46 loc) · 1.25 KB
/
index.js
File metadata and controls
46 lines (46 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"use strict";
/// <reference types="node" />
var nexusfork_1 = require("./src/nexusfork");
var _ = require("lodash");
var _export = function (config, cb) {
if (cb === void 0) { cb = _.noop; }
if (_.isFunction(config)) {
cb = config;
config = undefined;
}
var nexusfork = new nexusfork_1.NexusFork(config);
nexusfork.start(function (err) {
cb(err, nexusfork);
});
};
var props = {};
var loadables = [
[
"service",
["Service", "SimpleCommService", "ServiceGroup"]
]
];
loadables.forEach(function (loadable) {
loadable[1].forEach(function (key) {
props[key] = {
get: function () {
var mod = require(loadable[0]);
var clazz = mod[key];
Object.defineProperty(_export, key, {
enumerable: true,
value: clazz
});
return clazz;
},
enumerable: true,
configurable: true
};
});
});
Object.defineProperties(_export, props);
Object.defineProperty(_export, "NexusFork", {
enumerable: true,
value: nexusfork_1.NexusFork
});
module.exports = _export;
//# sourceMappingURL=index.js.map