Files
bigcapital/packages/server/src/utils/template-render.ts
2025-06-15 15:22:19 +02:00

8 lines
267 B
TypeScript

import * as path from 'path';
import * as pug from 'pug';
export function templateRender(filePath: string, options: Record<string, any>) {
const templatePath = path.join(global.__views_dirname, `${filePath}.pug`);
return pug.renderFile(templatePath, options);
}