mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
14 lines
307 B
TypeScript
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 };
|