early/ts/index.ts

22 lines
563 B
TypeScript

/// <reference path="./typings/index.d.ts" />
import colors = require("colors");
import path = require("path");
import childProcess = require("child_process");
let earlyChild;
// exports
export let start = function(moduleNameArg:string = "",loaderLengthArg:string = "10"){
earlyChild = childProcess.fork(path.join(__dirname,"early.child.js"),[],{
env: {
moduleNameArg:moduleNameArg,
loaderLengthArg:loaderLengthArg,
CI: process.env.CI
}
});
};
export let stop = function(){
earlyChild.kill();
};