UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

75 lines 2.13 kB
import { SSGProgressCallback } from './ssg'; import { FileChangeEvent } from '../../pkg/web/watcher/types'; import { MarkdownRenderer } from "../domain/markdown"; export interface IncrementalBuildConfig { projDir: string; modulesDir: string; contentDir: string; projContentDir?: string; publicDir: string; enableWatching: boolean; batchDelay?: number; progressCallback?: SSGProgressCallback; markdown: MarkdownRenderer; liveReload?: { enabled?: boolean; port?: number; host?: string; livereloadPort?: number; }; } export declare class IncrementalBuildCoordinator { private config; private fileWatcher?; private liveReloadServer?; private buildInProgress; private initialized; private domainInstances?; constructor(config: IncrementalBuildConfig); /** * 初始化:执行首次完整构建并保存 domain 实例 */ initialize(): Promise<void>; /** * 执行完整构建并缓存 domain 实例 */ private performFullBuildAndCacheDomains; startWatching(): Promise<void>; stopWatching(): Promise<void>; /** * 处理文件变更事件,触发增量构建 * 阶段3-5:完整的增量构建流程 */ private handleFileChanges; needFullRebuild(events: FileChangeEvent[]): boolean; /** * 执行增量构建(阶段3-5的核心实现) */ private performIncrementalBuild; getEventsFilePaths(events: FileChangeEvent[]): string[]; /** * 第2阶段的临时实现:执行完整重建并通知 Live Reload */ private performFullRebuild; /** * 获取当前是否已初始化 */ isInitialized(): boolean; /** * 获取是否正在构建 */ isBuildInProgress(): boolean; /** * 获取配置信息 */ getConfig(): IncrementalBuildConfig; getServerUrl(): string; /** * 获取 Live Reload 服务器状态 */ getLiveReloadStatus(): { running: boolean; url?: string; }; } //# sourceMappingURL=incremental-build-coordinator.d.ts.map