MCPcopy
hub / github.com/OI-wiki/OI-wiki / TaskHandler

Interface TaskHandler

scripts/post-build/html-postprocess.ts:36–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 * `siteDir` and `filePath` are **absolute** paths.
35 */
36export interface TaskHandler<GlobalInitializationResult = unknown> {
37 globalInitialize?(siteDir: string): Promise<GlobalInitializationResult>;
38 initialize?(globalInitializationResult: GlobalInitializationResult, siteDir: string): Promise<void>;
39 process(document: HTMLElement, filePath: string): Promise<void>;
40 finalize?(): Promise<void>;
41}
42
43/**
44 * Load task handlers from corresponding directories with dynamic import.

Callers 5

initializeMethod · 0.65
handleFileFunction · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected