UNPKG

@builder.io/dev-tools

Version:

Builder.io Visual CMS Devtools

17 lines (16 loc) 722 B
/** * Prettier integration with graceful degradation. * * Prettier is externalized from the pkg binary to avoid dynamic import issues. * This module handles the case where prettier may not be available at runtime. */ /** * Load prettier, preferring the user's local installation. * Falls back to built-in prettier, or null if not available. */ export declare function loadPrettier(absoluteFilePath: string | undefined): typeof import("prettier") | null; /** * Format code using prettier. * Gracefully returns original code if prettier is not available. */ export declare function prettierFormat(workingDirectory: string, code: string, parser: string | undefined, filePath: string | undefined): Promise<string>;