now paying respect to commandline
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
/// <reference path="./typings/index.d.ts" />
 | 
			
		||||
import "typings-global";
 | 
			
		||||
let colors = require("colors");
 | 
			
		||||
import readline = require("readline");
 | 
			
		||||
let rl; 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										35
									
								
								ts/index.ts
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								ts/index.ts
									
									
									
									
									
								
							@@ -1,21 +1,36 @@
 | 
			
		||||
/// <reference path="./typings/index.d.ts" />
 | 
			
		||||
import "typings-global"
 | 
			
		||||
import colors = require("colors");
 | 
			
		||||
import path = require("path");
 | 
			
		||||
 | 
			
		||||
import readline = require("readline");
 | 
			
		||||
import childProcess = require("child_process");
 | 
			
		||||
let earlyChild;
 | 
			
		||||
 | 
			
		||||
let doAnimation:boolean = true;
 | 
			
		||||
if(process.argv.indexOf("-v") != -1){
 | 
			
		||||
    doAnimation = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 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
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
    if(doAnimation){
 | 
			
		||||
        earlyChild = childProcess.fork(path.join(__dirname,"early.child.js"),[],{
 | 
			
		||||
            env: {
 | 
			
		||||
                moduleNameArg:moduleNameArg,
 | 
			
		||||
                loaderLengthArg:loaderLengthArg,
 | 
			
		||||
                CI: process.env.CI
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export let stop = function(){
 | 
			
		||||
    earlyChild.kill();
 | 
			
		||||
    if(doAnimation){
 | 
			
		||||
        earlyChild.kill();
 | 
			
		||||
        let rl = readline.createInterface({
 | 
			
		||||
            input: process.stdin,
 | 
			
		||||
            output: process.stdout
 | 
			
		||||
        });
 | 
			
		||||
        rl.close();
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "globalDependencies": {
 | 
			
		||||
    "colors": "registry:dt/colors#0.6.0-1+20160501135139",
 | 
			
		||||
    "node": "registry:dt/node#6.0.0+20160514165920"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user