willow-cli
Version:
CLI for installing Willow Design System components
31 lines • 1.17 kB
TypeScript
import type { ProjectType } from '../types/index.js';
export interface TemplateContext {
projectType: ProjectType;
isOnlineIDE: boolean;
[key: string]: any;
}
/**
* Load a template file and optionally process it with context
*/
export declare function loadTemplate(templatePath: string, context?: TemplateContext): Promise<string>;
/**
* Load multiple templates in parallel
*/
export declare function loadTemplates(templatePaths: string[], context?: TemplateContext): Promise<Record<string, string>>;
/**
* Get the appropriate template variant based on project type
*/
export declare function getTemplateVariant(baseName: string, projectType: ProjectType): string;
/**
* Load template with automatic variant selection
*/
export declare function loadTemplateVariant(baseName: string, projectType: ProjectType, context?: TemplateContext): Promise<string>;
/**
* Check if a template exists
*/
export declare function templateExists(templatePath: string): Promise<boolean>;
/**
* List available templates in a directory
*/
export declare function listTemplates(subdirectory?: string): Promise<string[]>;
//# sourceMappingURL=templateLoader.d.ts.map