Remover
Flexible spawn() with exec() syntax.
Install
npm install spawnx
API
spawnx(command, [options,] callback);
Usage
var run = ;// let's pipe the output from the command to a log file as it comes.var stream = fs;
Options
Whatever options you pass in the options argument will be passed to the actual
spawn()
call. There are two additional options that you may pass: stdout
and
stderr
. If present, spawnx will pipe the output from the spawn
command to
those streams. That way you can have live output of a running command.
Also important: the path to command may be relative, in which case the full
path is looked for by searching the environment's $PATH
. If now options.cwd
is
set, the command's dirname is set as the cwd
for the spawn call.
Credits
Written by Tomás Pollak.
Copyright
(c) Fork Ltd. MIT license.