Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft > IHeftTaskHooks

IHeftTaskHooks interface

Hooks that are available to the task plugin.

Signature:

export interface IHeftTaskHooks 

Properties

PropertyModifiersTypeDescription
registerFileOperationsreadonlyAsyncSeriesWaterfallHook<IHeftTaskFileOperations>If provided, the registerFileOperations hook is called exactly once before the first time either run or runIncremental would be invoked to provide the plugin an opportunity to request dynamic file copy or deletion operations.
runreadonlyAsyncParallelHook<IHeftTaskRunHookOptions>The run hook is called after all dependency task executions have completed during a normal run, or during a watch mode run when no runIncremental hook is provided. It is where the plugin can perform its work. To use it, call run.tapPromise(<pluginName>, <callback>).
runIncrementalreadonlyAsyncParallelHook<IHeftTaskRunIncrementalHookOptions>If provided, the runIncremental hook is called after all dependency task executions have completed during a watch mode run. It is where the plugin can perform incremental work. To use it, call run.tapPromise(<pluginName>, <callback>).