Run tasks as parallel child processes with same agruments.
$ yarn add --dev @start/plugin-parallel
# or
$ npm install --save-dev @start/plugin-parallel
parallel(taskNames: string[], options?: {}): (...args: string[])
Array of exported task names.
maxProcesses
–Infinity
by default
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)
)