@wttp/site
Version:
Web3 Transfer Protocol (WTTP) - Site Contracts and deployment tools
42 lines • 1.25 kB
TypeScript
export interface WTTPIgnoreOptions {
includeDefaults?: boolean;
customPatterns?: string[];
}
export declare class WTTPIgnore {
private patterns;
private baseDir;
constructor(baseDir: string, options?: WTTPIgnoreOptions);
/**
* Load patterns from .wttpignore file
*/
private loadIgnoreFile;
/**
* Parse .wttpignore file content into patterns
*/
private parseIgnoreFile;
/**
* Check if a file/directory should be ignored
*/
shouldIgnore(filePath: string): boolean;
/**
* Match a file path against a pattern (supports wildcards and directory patterns)
*/
private matchPattern;
/**
* Get all patterns currently loaded
*/
getPatterns(): string[];
/**
* Filter an array of file paths, removing ignored ones
*/
filterPaths(paths: string[]): string[];
}
/**
* Create a WTTPIgnore instance for a directory
*/
export declare function createWTTPIgnore(baseDir: string, options?: WTTPIgnoreOptions): WTTPIgnore;
/**
* Quick function to check if a single file should be ignored
*/
export declare function shouldIgnoreFile(filePath: string, baseDir: string, options?: WTTPIgnoreOptions): boolean;
//# sourceMappingURL=wttpIgnore.d.ts.map