Files
morten-olsen.github.io/bin/resources/ejs/index.ts
Morten Olsen 7adf03c83f cleanup
2023-03-28 08:10:46 +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 };