diff --git a/src/index.ts b/src/index.ts index 6212695..e32b5fe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,21 @@ +import fs from "fs"; + +import { generateRenderTemplate } from "./htmlTemplate"; import { svgs } from "./config"; (async () => { - svgs.map((svg: string) => console.log(svg)); + // iterate over all .svg files + svgs.forEach((svg) => { + // reading file + fs.readFile(svg, "utf8", (error, data) => { + if (error) { + return console.log(error); + } + + // Generating HTML Template + const template = generateRenderTemplate(data); + + console.log(template); + }); + }); })();