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
executer.runSequentially([
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
]);
executer.runParallel([
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
]);
executer.runParallel(
[
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
],
{silent: true}
);
executer.runParallel(
[
{
cmd: `ls`,
label: 'types',
},
{
cmd: `ls`,
label: 'electron',
cwd: __dirname,
},
],
{aggregateOutput: true}
);