zyf-server
Version:
A modern HTTP static file server with Vue SSR directory listing, built for developers
27 lines • 692 B
TypeScript
/**
* 模板引擎
* 处理EJS模板和Vue SSR渲染
*/
import type { VueSSRContext } from '../types';
export declare class TemplateEngine {
private readonly ssrTemplate;
private readonly ejsTemplate;
private readonly vueRenderer;
constructor();
/**
* 渲染EJS模板
*/
render(template: string, data: Record<string, unknown>): Promise<string>;
/**
* 渲染Vue SSR
*/
renderVueSSR(context: VueSSRContext): Promise<string>;
/**
* 渲染目录列表(使用EJS)
*/
renderDirectoryListing(dirs: Array<{
name: string;
path: string;
}>): Promise<string>;
}
//# sourceMappingURL=TemplateEngine.d.ts.map