(template: TemplateType)
| 56 | |
| 57 | export const buildHtml = |
| 58 | (template: TemplateType) => |
| 59 | async ({ title, data }: RenderTemplateOptions): Promise<string> => { |
| 60 | const [script, style] = await Promise.all([ |
| 61 | fs.readFile(path.join(import.meta.dirname, "..", "..", "lib", `${template}.js`), "utf8"), |
| 62 | fs.readFile(path.join(import.meta.dirname, "..", "..", "lib", `${template}.css`), "utf8"), |
| 63 | ]); |
| 64 | |
| 65 | return buildHtmlTemplate(title, script, data, style); |
| 66 | }; |
no test coverage detected