early/dist/index.js

21 lines
2.1 KiB
JavaScript
Raw Permalink Normal View History

2016-05-20 17:06:25 +00:00
"use strict";
2016-05-23 02:51:45 +00:00
var path = require("path");
var childProcess = require("child_process");
var earlyChild;
2016-05-21 18:33:13 +00:00
// exports
exports.start = function (moduleNameArg, loaderLengthArg) {
2016-05-21 22:38:14 +00:00
if (moduleNameArg === void 0) { moduleNameArg = ""; }
if (loaderLengthArg === void 0) { loaderLengthArg = "10"; }
2016-05-23 02:51:45 +00:00
earlyChild = childProcess.fork(path.join(__dirname, "early.child.js"), [], {
env: {
moduleNameArg: moduleNameArg,
loaderLengthArg: loaderLengthArg
}
});
2016-05-20 17:06:25 +00:00
};
exports.stop = function () {
earlyChild.kill();
2016-05-20 17:06:25 +00:00
};
2016-05-23 02:51:45 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxJQUFPLElBQUksV0FBVyxNQUFNLENBQUMsQ0FBQztBQUU5QixJQUFPLFlBQVksV0FBVyxlQUFlLENBQUMsQ0FBQztBQUMvQyxJQUFJLFVBQVUsQ0FBQztBQUNmLFVBQVU7QUFDQyxhQUFLLEdBQUcsVUFBUyxhQUF5QixFQUFDLGVBQTZCO0lBQXZELDZCQUF5QixHQUF6QixrQkFBeUI7SUFBQywrQkFBNkIsR0FBN0Isc0JBQTZCO0lBQy9FLFVBQVUsR0FBRyxZQUFZLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFDLGdCQUFnQixDQUFDLEVBQUMsRUFBRSxFQUFDO1FBQ3BFLEdBQUcsRUFBRTtZQUNELGFBQWEsRUFBQyxhQUFhO1lBQzNCLGVBQWUsRUFBQyxlQUFlO1NBQ2xDO0tBQ0osQ0FBQyxDQUFDO0FBQ1AsQ0FBQyxDQUFDO0FBRVMsWUFBSSxHQUF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