mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-18 00:54:46 -04:00
🎉 Generating html templates for each svg files
This commit is contained in:
parent
4e44cb47e0
commit
4d63be07ac
1 changed files with 17 additions and 1 deletions
18
src/index.ts
18
src/index.ts
|
@ -1,5 +1,21 @@
|
||||||
|
import fs from "fs";
|
||||||
|
|
||||||
|
import { generateRenderTemplate } from "./htmlTemplate";
|
||||||
import { svgs } from "./config";
|
import { svgs } from "./config";
|
||||||
|
|
||||||
(async () => {
|
(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);
|
||||||
|
});
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue