Files
morten-olsen.github.io/bin/resources/ejs/index.ts
Morten Olsen 9b1a067d56 init
2023-03-27 10:46:18 +02:00

14 lines
307 B
TypeScript

import { createFile } from "../file";
import ejs from "ejs";
const createEjs = (path: string) => {
const file = createFile({ path });
const template = file.pipe(async (tmpl) => {
const compiled = ejs.compile(tmpl.toString());
return compiled;
});
return template;
};
export { createEjs };