Files
nrwl--nx/packages/devkit/src/generators/run-tasks-in-serial.ts
T
2026-07-13 12:38:36 +08:00

17 lines
320 B
TypeScript

import type { GeneratorCallback } from 'nx/src/devkit-exports';
/**
* Run tasks in serial
*
* @param tasks The tasks to run in serial.
*/
export function runTasksInSerial(
...tasks: GeneratorCallback[]
): GeneratorCallback {
return async () => {
for (const task of tasks) {
await task();
}
};
}