early/ts/index.ts

22 lines
563 B
TypeScript
Raw Normal View History

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
import childProcess = require("child_process");
let earlyChild;
2016-05-21 18:33:13 +00:00
// exports
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"),[],{
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
};
export let stop = function(){
earlyChild.kill();
2016-05-20 17:06:25 +00:00
};