@plugjs/plug
Version:
PlugJS Build System ===================
14 lines (13 loc) • 1.2 kB
TypeScript
import type { Build, BuildDef, BuildProps, BuildTasks, ThisBuild } from './types';
/** Compile a {@link BuildDef | build definition} into a {@link Build} */
export declare function plugjs<D extends BuildDef, B extends ThisBuild<D>>(def: D & ThisType<B>): Build<D>;
/** @deprecated Please use the new {@link plugjs} export */
export declare const build: typeof plugjs;
/** Check if the specified build is actually a {@link Build} */
export declare function isBuild(build: any): build is Build<Record<string, any>>;
/** Invoke a number of tasks in a {@link Build} */
export declare function invokeTasks<B extends Build>(build: B, tasks: readonly BuildTasks<B>[], props?: BuildProps<B>): Promise<void>;
/** Make sure that the specified hooks run _before_ the given tasks */
export declare function hookBefore<B extends Build, T extends keyof B>(build: B, taskName: string & T & BuildTasks<B>, hooks: readonly (string & Exclude<BuildTasks<B>, T>)[]): void;
/** Make sure that the specified hooks run _after_ the given tasks */
export declare function hookAfter<B extends Build, T extends keyof B>(build: B, taskName: string & T & BuildTasks<B>, hooks: readonly (string & Exclude<BuildTasks<B>, T>)[]): void;