mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-19 01:35:11 -04:00
💖 semi-animated directory logs
This commit is contained in:
parent
18e2b84892
commit
9f08ae3ff5
1 changed files with 10 additions and 9 deletions
|
@ -20,18 +20,19 @@ export default class SvgDirectoryParser {
|
||||||
const cursorDir = path.resolve(this.svgDir, "static");
|
const cursorDir = path.resolve(this.svgDir, "static");
|
||||||
|
|
||||||
if (!fs.existsSync(cursorDir)) {
|
if (!fs.existsSync(cursorDir)) {
|
||||||
console.log("Considering as semi-animated theme");
|
console.log(`Considering ${cursorDir} as semi-animated theme`);
|
||||||
this.semiAnimated = true;
|
this.semiAnimated = true;
|
||||||
}
|
return [];
|
||||||
|
} else {
|
||||||
|
const staticCursors = fs
|
||||||
|
.readdirSync(cursorDir)
|
||||||
|
.map((f) => path.resolve(cursorDir, f));
|
||||||
|
|
||||||
const staticCursors = fs
|
if (staticCursors.length == 0) {
|
||||||
.readdirSync(cursorDir)
|
throw new Error("🚨 Static Cursors directory is empty");
|
||||||
.map((f) => path.resolve(cursorDir, f));
|
}
|
||||||
|
return staticCursors;
|
||||||
if (staticCursors.length == 0) {
|
|
||||||
throw new Error("🚨 Static Cursors directory is empty");
|
|
||||||
}
|
}
|
||||||
return staticCursors;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue