2016-05-20 17:06:25 +00:00
|
|
|
/// <reference path="./typings/index.d.ts" />
|
2016-05-23 02:51:45 +00:00
|
|
|
import colors = require("colors");
|
|
|
|
import path = require("path");
|
2016-05-20 17:44:52 +00:00
|
|
|
|
2016-05-23 02:40:04 +00:00
|
|
|
import childProcess = require("child_process");
|
|
|
|
let earlyChild;
|
2016-05-21 18:33:13 +00:00
|
|
|
// exports
|
2016-05-23 02:40:04 +00:00
|
|
|
export let start = function(moduleNameArg:string = "",loaderLengthArg:string = "10"){
|
2016-05-23 02:51:45 +00:00
|
|
|
earlyChild = childProcess.fork(path.join(__dirname,"early.child.js"),[],{
|
2016-05-23 02:40:04 +00:00
|
|
|
env: {
|
|
|
|
moduleNameArg:moduleNameArg,
|
|
|
|
loaderLengthArg:loaderLengthArg
|
|
|
|
}
|
|
|
|
});
|
2016-05-20 17:06:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export let stop = function(){
|
2016-05-23 02:40:04 +00:00
|
|
|
earlyChild.kill();
|
2016-05-20 17:06:25 +00:00
|
|
|
};
|
|
|
|
|