MCPcopy Create free account
hub / github.com/btd/rollup-plugin-visualizer / buildHtml

Function buildHtml

plugin/render-template/html.ts:58–66  ·  view source on GitHub ↗
(template: TemplateType)

Source from the content-addressed store, hash-verified

56
57export 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 };

Callers 1

index.tsFile · 0.85

Calls 1

buildHtmlTemplateFunction · 0.85

Tested by

no test coverage detected