mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
init
This commit is contained in:
13
bin/resources/ejs/index.ts
Normal file
13
bin/resources/ejs/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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 };
|
||||
Reference in New Issue
Block a user