UNPKG

tronbox

Version:

TronBox - Simple development framework for Tron

1 lines 478 B
"use strict";var path=require("path");var spawn=require("child_process").spawn;var cli_path=path.resolve(path.join(__dirname,"./index.js"));var args=[cli_path,"exec"];Array.prototype.push.apply(args,process.argv.slice(2));var cmd=spawn("node",args);cmd.stdout.on("data",function(data){console.info(data.toString())});cmd.stderr.on("data",function(data){console.error(data.toString())});cmd.on("close",function(code){process.exit(code)});cmd.on("error",function(err){throw err});