spawn-stack
Spawn a new process using stack
command with the given arguments
const spawnStack = ; ;
Installation
Make sure stack
command is installed in your $PATH
, then install spawn-stack
via npm CLI.
npm install spawn-stack
API
const spawnStack = ;
spawnStack(args [, options])
args: Array<string>
(command line arguments passed to stack
command)
options: Object
(execa
options, with preferLocal
defaulting to false
)
Return: ChildProcess
It returns the same value as execa
's:
a
child_process
instance, which is enhanced to also be aPromise
for a resultObject
withstdout
andstderr
properties.
On POSIX, --allow-different-user
flag will be automatically enabled to prevent file permission problems, unless --no-allow-different-user
flag is explicitly provided.
processplatform !== 'win32'; //=> true ; ;
The return value also has Symbol.observable
method that returns a zen-observable instance passing each line of stderr
to its Subscription
. That means you can convert the return value into an Observable
by using Observable.from
.
const Observable = ;const spawnStack = ; const cp = ; Observable;
License
ISC License © 2017 - 2018 Shinnosuke Watanabe