@validkeys/ollypop-ts
Version:
Automatic TypeScript barrel file generator CLI.
41 lines • 1.2 kB
TypeScript
import type { FileInfo, GenerationOptions } from './types.js';
export interface TemplateContext {
files: FileInfo[];
options: GenerationOptions;
outputPath?: string;
templateConfig?: any;
exclude?: string[];
banner?: string;
metadata: {
generatedAt: string;
fileCount: number;
};
}
export declare class TemplateEngine {
private templates;
constructor();
private registerDefaultTemplates;
generate(templateName: string, context: TemplateContext): string;
registerTemplate(name: string, template: (context: TemplateContext) => string): void;
private toPascalCase;
private toCamelCase;
private toKebabCase;
private toSingular;
private toPlural;
private trimPrefix;
private trimSuffix;
private addPrefix;
private addSuffix;
private replaceText;
private capitalize;
private uncapitalize;
private addBanner;
private applyTransform;
private generateVariableTemplate;
private extractPathVariables;
private isFileBasedPattern;
private findMatchingPaths;
private filterExistingFiles;
private resolveVariableTemplate;
}
//# sourceMappingURL=templates.d.ts.map