Execute a file.
Think of this as a mix of child_process.execFile
and child_process.spawn
.
The program/script to execute.
Arguments to pass to file
on execution.
A child_process
instance, which is enhanced to also be a Promise
for a result Object
with stdout
and stderr
properties.
Same as execa()
except both file and arguments are specified in a single command
string. For example, execa('echo', ['unicorns'])
is the same as execa.command('echo unicorns')
.
If the file or an argument contains spaces, they must be escaped with backslashes. This matters especially if command
is not a constant but a variable, for example with __dirname
or process.cwd()
. Except for spaces, no escaping/quoting is needed.
The shell
option must be used if the command
uses shell-specific features, as opposed to being a simple file
followed by its arguments
.
The program/script to execute and its arguments.
A child_process
instance, which is enhanced to also be a Promise
for a result Object
with stdout
and stderr
properties.
Same as execa.command()
but synchronous.
The program/script to execute and its arguments.
A result Object
with stdout
and stderr
properties.
Execute a Node.js script as a child process.
Same as execa('node', [scriptPath, ...arguments], options)
except (like child_process#fork()
):
Node.js script to execute.
Arguments to pass to scriptPath
on execution.
A child_process
instance, which is enhanced to also be a Promise
for a result Object
with stdout
and stderr
properties.
Execute a file synchronously.
This method throws an Error
if the command fails.
The program/script to execute.
Arguments to pass to file
on execution.
A result Object
with stdout
and stderr
properties.
Define task description
Create namespace prefix for inner tasks
namespace
Define a task cli option
Set global options for all tasks.
Set options for next task.
Define task cli options are strict, which means it will throw an error if you passed undefined options.
Define a task
Define a task
exists via lstat, if a symbolic link's target file doesn't exists, fs.exists
will return false, but fs.lexists
will return true.
Make directory with parents, like mkdir -p
Make directory with parents, like mkdir -p
Remove file or directory recursively, like rm -rf
The path to remove
Generated using TypeDoc
ms, default 300