Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 784 Bytes

readme.md

File metadata and controls

49 lines (34 loc) · 784 Bytes

🔀 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

  • maxProcessesInfinity 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)
  )