mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-17 08:35:03 -04:00
🧹 cleanup
This commit is contained in:
parent
cce5a2ed84
commit
2a8de5b4f6
1 changed files with 6 additions and 7 deletions
13
src/index.ts
13
src/index.ts
|
@ -2,9 +2,10 @@ import fs from "fs";
|
|||
import path from "path";
|
||||
|
||||
import { generateRenderTemplate } from "./helpers/htmlTemplate";
|
||||
// import { renderSvg } from "./helpers/render";
|
||||
import { staticSvgs, bitmapsDir } from "./config";
|
||||
|
||||
import { renderSvg } from "./helpers/render";
|
||||
|
||||
const generateStaticSvgBitmaps = async (svg: string) => {
|
||||
fs.readFile(svg, "utf8", (error, data) => {
|
||||
if (error) {
|
||||
|
@ -12,13 +13,11 @@ const generateStaticSvgBitmaps = async (svg: string) => {
|
|||
}
|
||||
|
||||
// Generating HTML Template
|
||||
generateRenderTemplate(data);
|
||||
const template = generateRenderTemplate(data);
|
||||
|
||||
// preparing paths
|
||||
let bitmap = path.parse(svg).base;
|
||||
bitmap = path.resolve(bitmapsDir, bitmap);
|
||||
|
||||
console.log(bitmap);
|
||||
// rendering with frames=1 beacause of static
|
||||
const bitmap = `${path.basename(svg, ".svg")}.png`;
|
||||
renderSvg(template, 1, bitmap, bitmapsDir);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue