@start/plugin-parallel
TypeScript icon, indicating that this package has built-in type declarations

2.0.0Β β€’Β PublicΒ β€’Β Published

πŸ”€ plugin-parallel

Run tasks as parallel child processes with same agruments.

Install

$ yarn add --dev @start/plugin-parallel

Usage

Signature

parallel(taskNames: string[], options?: {}): (...args: string[])

taskNames

Array of exported task names.

options

  • maxProcesses – Infinity by default

Example

import sequence from '@start/plugin-sequence'
import find from '@start/plugin-find'
import remove from '@start/plugin-remove'
import parallel from '@start/plugin-parallel'

export const buildCJS = (...args) => {
  // …
}

export const buildESM = (...args) => {
  // …
}

export const task = (...args) =>
  sequence(
    find('build/'),
    remove,
    parallel(['buildCJS', 'buildESM'])(...args)
  )

Package Sidebar

Install

npm i @start/plugin-parallel

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

4.26 kB

Total Files

6

Last publish

Collaborators

  • fosimus
  • psxcode
  • deepsweet