2016-05-20 17:06:25 +00:00
|
|
|
/// <reference path="./typings/index.d.ts" />
|
|
|
|
let colors = require("colors");
|
2016-05-20 17:44:52 +00:00
|
|
|
let readline = require("readline");
|
|
|
|
|
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"){
|
|
|
|
earlyChild = childProcess.fork("./dist/early.child.js",[],{
|
|
|
|
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
|
|
|
};
|
|
|
|
|