🔗 Paths

This commit is contained in:
ful1e5 2020-08-28 11:56:14 +05:30
parent f3f3778ab2
commit 85d0083f40

View file

@ -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);
}
};