Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | import { TaskLogger } from "../logger/TaskLogger"; import { Config } from "./Config"; export interface TaskArgs { packageName?: string; taskName?: string; options?: any; cwd: string; config: Config; logger: TaskLogger; } /** target configuration */ export interface TargetConfig { type?: "package" | "global"; run?: (args: TaskArgs) => Promise<boolean> | void; deps?: string[]; outputs?: string[]; priority?: number; cache?: boolean; options?: any; } export interface FactoryArgs { cwd: string; config: Config; } export interface TargetConfigFactory { (args: FactoryArgs): TargetConfig | TargetConfig[]; } /** Pipline Definition * * Example * * const p: Pipeline = { * // sharded jest * jest: () => { * const tasks: Target[] = []; * * for (let i = 0; i < 100; i++) { * tasks.push({ * type: "global", * task: (args) => { * // run jest for a shard * }, * }); * } * * return tasks; * }, * * build: { * deps: ['^build'] * }, * * validate: { * deps: [] * } * }; */ export interface PipelineDefinition { [task: string]: string[] | TargetConfig | TargetConfigFactory; } |