files
   1| 
   2| 
   3| 
   4| 
   5| 
   6| 
   7| 
   8| 
   9| 
  10| 
  11| 
  12| 
  13| 
  14| 
  15| 
  16| 

    
import ejs from "ejs";
import { templateFolder } from "../paths";
import { readFile } from "fs/promises";
import { join } from "path";

const c = async (name: string) => {
  return ejs.compile((await readFile(join(templateFolder, name))).toString());
};

export const templatesBuilder = async () => {
  return {
    source: await c('source.ejs'),
    welcome: await c('welcome.ejs'),
  };
};