mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-14 15:15:02 -04:00
🎨 Code refactor
This commit is contained in:
parent
57c424e668
commit
0771cf6777
1 changed files with 13 additions and 11 deletions
14
src/index.ts
14
src/index.ts
|
@ -1,19 +1,21 @@
|
|||
import fs from "fs";
|
||||
|
||||
import { generateRenderTemplate } from "./helpers/htmlTemplate";
|
||||
import { svgs } from "./config";
|
||||
import { staticSvgs } from "./config";
|
||||
|
||||
(async () => {
|
||||
// iterate over all .svg files
|
||||
svgs.forEach((svg) => {
|
||||
// reading file
|
||||
const generateStaticSvgBitmaps = (svg: string) => {
|
||||
fs.readFile(svg, "utf8", (error, data) => {
|
||||
if (error) {
|
||||
return console.log(error);
|
||||
}
|
||||
|
||||
// Generating HTML Template
|
||||
generateRenderTemplate(data);
|
||||
});
|
||||
};
|
||||
|
||||
(async () => {
|
||||
// iterate over all .svg files
|
||||
staticSvgs.forEach((svg) => {
|
||||
generateStaticSvgBitmaps(svg);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue