UNPKG

@gati-framework/cli

Version:

CLI tool for Gati framework - create, develop, build and deploy cloud-native applications

42 lines 1.07 kB
/** * @module cli/utils/watcher * @description File watching utility for hot reload in development */ import { type FSWatcher } from 'chokidar'; /** * File watcher options */ export interface WatcherOptions { /** * Paths to watch (glob patterns) */ paths: string[]; /** * Paths to ignore (glob patterns) * @default ['node_modules/**', 'dist/**', '.git/**'] */ ignored?: string[]; /** * Enable verbose logging * @default false */ verbose?: boolean; /** * Debounce delay in milliseconds * @default 300 */ debounce?: number; } /** * Callback type for file changes */ export type WatchCallback = (path: string, event: 'add' | 'change' | 'unlink') => void | Promise<void>; /** * Create a file watcher for development hot reload */ export declare function createWatcher(cwd: string, options: WatcherOptions, onChange: WatchCallback): FSWatcher; /** * Stop a file watcher */ export declare function stopWatcher(watcher: FSWatcher): Promise<void>; //# sourceMappingURL=watcher.d.ts.map