0.2.0 • Published 1 year ago
@bitmorest/excecute v0.2.0
The excecute native command in nodejs with parallel or sequentially mode
Install
npm install @bitmorest/excecute
Usage
Basic usage
import executer from '@bitmorest/excecute';
executer.runSequentially(arrayOfCommand, options);
executer.runParallel(arrayOfCommand, options);
Examples
// for sequentially mode
executer.runSequentially([
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
]);
// for parallel mode
executer.runParallel([
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
]);
// Silent mode
executer.runParallel(
[
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
],
{silent: true}
);
// you can use aggregate output
// this feature is useful when running tests. You want a full report
executer.runParallel(
[
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
],
{aggregateOutput: true}
);