UNPKG

@combino/plugin-rebase

Version:

Rebase plugin for Combino - handles relative path calculations for templatefiles

35 lines 1.3 kB
export interface Plugin { discover?: (context: any) => Promise<any> | any; compile?: (context: any) => Promise<any> | any; assemble?: (context: any) => Promise<any> | any; output?: (context: any) => Promise<void> | void; } export interface FileHookContext { sourcePath: string; id: string; content: string; data: Record<string, any>; allTemplates?: any[]; } export interface FileHookResult { content: string; id?: string; } export interface RebaseOptions { /** Optional base directory for relative calculations (default: output directory) */ baseDir?: string; /** Whether to normalize paths (default: true) */ normalize?: boolean; /** Project root directory (default: current working directory) */ projectRoot?: string; /** Type of path to output: "cwd" (relative to process.cwd()), "relative" (relative to file), or "absolute" (full path) */ format?: 'cwd' | 'relative' | 'absolute'; /** Whether to find the actual output location of the file/folder (default: false) */ locate?: boolean; } /** * Rebase Plugin Factory Function * Creates a plugin that provides a rebase() function for relative path calculations */ export default function plugin(options?: RebaseOptions): Plugin; //# sourceMappingURL=index.d.ts.map