early/dist/index.js

22 lines
2.2 KiB
JavaScript
Raw 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,
2016-05-23 03:02:49 +00:00
loaderLengthArg: loaderLengthArg,
CI: process.env.CI
}
});
2016-05-20 17:06:25 +00:00
};
exports.stop = function () {
earlyChild.kill();
2016-05-20 17:06:25 +00:00
};
2016-05-23 03:02:49 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxJQUFPLElBQUksV0FBVyxNQUFNLENBQUMsQ0FBQztBQUU5QixJQUFPLFlBQVksV0FBVyxlQUFlLENBQUMsQ0FBQztBQUMvQyxJQUFJLFVBQVUsQ0FBQztBQUNmLFVBQVU7QUFDQyxhQUFLLEdBQUcsVUFBUyxhQUF5QixFQUFDLGVBQTZCO0lBQXZELDZCQUF5QixHQUF6QixrQkFBeUI7SUFBQywrQkFBNkIsR0FBN0Isc0JBQTZCO0lBQy9FLFVBQVUsR0FBRyxZQUFZLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFDLGdCQUFnQixDQUFDLEVBQUMsRUFBRSxFQUFDO1FBQ3BFLEdBQUcsRUFBRTtZQUNELGFBQWEsRUFBQyxhQUFhO1lBQzNCLGVBQWUsRUFBQyxlQUFlO1lBQy9CLEVBQUUsRUFBRSxPQUFPLENBQUMsR0FBRyxDQUF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