spawned
Smart wrapper around child_process.spawn
using promises.
Usage
var spawned = ; ;
API
spawn(command, [args], [options])
Spawn a new process and returns a promise.
command
:String
the command to executeargs
:Array
a list of arguments to pass to the commandoptions
:Object
inherits the options from child_process.spawn plus these:- out: A
WriteableStream
receiving thestdout
data - err: A
WriteableStream
receiving thestderr
data
- out: A
Returns a promise which:
- when fullfilled resolves to an object like:
err
:String
containingstderr
out
:String
containigstdout
combined
:String
containing the intermingled contents ofstdout
andstderr
code
:Number
the return code of the program
- when rejected resolves to an
Error
having the same properties as above.