Détail du package

runstorm

electrovir0(MIT or CC0 1.0)0.6.2

Easily run multiple commands in parallel threads.

parallel, execution, worker, thread

readme

RunStorm

Easily run multiple commands in parallel threads.

Reference docs: http://electrovir.github.io/runstorm

Install

npm i -D runstorm

CLI

List the commands to run in parallel:

npx runstorm "echo 'command 1'" "sleep 2 && echo 'command 2'"

Run npx runstorm --help to see additional options.

API

Commands can be run with runCommands:

import {ColorKey, runCommands} from 'runstorm';

await runCommands([
    {
        command: 'echo "command 1"',
        color: ColorKey.red,
    },
    {
        command: 'sleep 2 && echo "command 2"',
        color: ColorKey.blue,
        name: 'delayed',
    },
]);