npm.io
0.0.6 • Published 8 years ago

ts-child-process

Licence
MIT
Version
0.0.6
Deps
2
Size
28 kB
Vulns
1
Weekly
0

ts-child-process

Asynchronously execute child-processes on the local or a remote machine.

Local

const process: Process = await executor().then(exec => exec.execute("npm", ["--version"], {
    shell: true,
});

Remote

const process: Process = await executor({
    host: "example.com",
    username: "root",
    password: "*****",
}).then(exec => exec.execute("npm", ["--version"]);

Usage

process.on("out", (txt) => console.log("OUT", txt))
  .on("err", (txt) => console.log("ERR", txt))
  .on("close", (code, sig) => console.log("CLOSE", code, sig)));

Keywords