Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

alloc/picorun

Repository files navigation

picorun

Run commands in parallel, with labels and colors, from CLI or JS. Automatically finds executables in ./node_modules/.bin.

pnpm add picorun

CLI Usage

picorun "cmd1" "cmd2" --names=name1,name2 --filter "name1"

Options:

  • --names: Comma-separated list of custom names for each command.
  • --filter: Run only tasks matching the given name pattern (can be used multiple times). Wildcards (*) are supported.

API Usage

import picorun from 'picorun'
const tasks = picorun(
 // Tasks definition
 [
 { cmd: 'cmd1', name: 'Task 1' },
 { cmd: 'cmd2', name: 'Task 2' },
 { cmd: 'cmd3', name: 'Another Task' },
 ],
 // Options
 {
 // Only run tasks named 'Task 1' or 'Task 2'
 filter: ['Task 1', 'Task 2'],
 }
)
tasks[0].name // => 'Task 1'
tasks[0].subprocess // => [object ChildProcess]
// Wait for one task to complete
await tasks[0]
// Wait for all tasks to complete
await tasks

Prior Art

About

Parallel task runner with a CLI and a JS API

Topics

Resources

License

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /