feat: add plugin buildStart and buildEnd hooks (#1770)

This commit is contained in:
Marvin Hagemeister
2023-09-18 17:46:34 +02:00
committed by GitHub
parent d94d3db4aa
commit c76f15479f
11 changed files with 161 additions and 15 deletions
+9
View File
@@ -427,6 +427,15 @@ export interface Plugin<State = Record<string, unknown>> {
*/
renderAsync?(ctx: PluginAsyncRenderContext): Promise<PluginRenderResult>;
/**
* Called before running the Fresh build task
*/
buildStart?(): Promise<void> | void;
/**
* Called after completing the Fresh build task
*/
buildEnd?(): Promise<void> | void;
routes?: PluginRoute[];
middlewares?: PluginMiddleware<State>[];