mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-22 11:15:26 -04:00
🔗 Paths
This commit is contained in:
parent
f3f3778ab2
commit
85d0083f40
1 changed files with 11 additions and 3 deletions
14
src/index.ts
14
src/index.ts
|
@ -18,6 +18,14 @@ const main = async () => {
|
|||
headless: true,
|
||||
});
|
||||
|
||||
// Paths
|
||||
if (fs.existsSync(svgsDir)) {
|
||||
console.log("Source .svg files not found");
|
||||
}
|
||||
if (!fs.existsSync(bitmapsDir)) {
|
||||
fs.mkdirSync(bitmapsDir);
|
||||
}
|
||||
|
||||
try {
|
||||
console.log("📸 Rendering Static Cursors...");
|
||||
// Rendering satic .svg files
|
||||
|
@ -89,11 +97,11 @@ const main = async () => {
|
|||
|
||||
await page.close();
|
||||
}
|
||||
|
||||
console.log(`\nBitmaps stored at ${bitmapsDir}\n\n🎉 Render Done.`);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
console.log(`\nBitmaps stored at ${bitmapsDir}\n\n🎉 Render Done.`);
|
||||
process.exit(0);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue