UNPKG

@mintlify/common

Version:

Commonly shared code within Mintlify

23 lines (22 loc) 1.13 kB
/** * Default patterns that Mintlify always ignores, regardless of .mintignore configuration. * These directories are typically version control, IDE configs, or dependencies. */ export declare const DEFAULT_MINT_IGNORES: string[]; /** * Processes the contents of a .mintignore file and returns an array of relevant patterns. * The ignore package automatically handles comments (lines starting with #) and empty lines. * * @param mintIgnoreContent The content of the .mintignore file. * @returns An array of glob patterns. */ export declare function processMintIgnoreString(mintIgnoreContent: string): string[]; /** * Checks if a file path is ignored based on the provided glob patterns and default ignores. * Always includes DEFAULT_MINT_IGNORES in addition to any custom patterns provided. * * @param filePath The path of the file to check. * @param globs An array of custom glob patterns (output from processMintIgnoreString). * @returns True if the file matches any of the ignore patterns (default or custom), false otherwise. */ export declare function isMintIgnored(filePath: string, globs?: string[]): boolean;