mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-28 14:04:45 -04:00
🔧 Config
This commit is contained in:
parent
ca353efed6
commit
e03b5c7b53
1 changed files with 23 additions and 2 deletions
|
@ -1,10 +1,31 @@
|
||||||
import { resolve } from "path";
|
import { resolve } from "path";
|
||||||
import { staticCursors, animatedCursors, animatedClip } from "./cursors.json";
|
import { readdirSync, existsSync } from "fs";
|
||||||
|
|
||||||
// Source Directory
|
// Source Directory
|
||||||
const svgsDir = resolve(__dirname, "svg");
|
const svgsDir = resolve(__dirname, "svg");
|
||||||
|
if (!existsSync(svgsDir)) {
|
||||||
|
console.log("Source .svg files not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
const staticCursorsDir = resolve(svgsDir, "static");
|
||||||
|
const animatedCursorsDir = resolve(svgsDir, "animated");
|
||||||
|
|
||||||
// Out Directory
|
// Out Directory
|
||||||
const bitmapsDir = resolve(__dirname, "../", "bitmaps");
|
const bitmapsDir = resolve(__dirname, "../", "bitmaps");
|
||||||
|
|
||||||
export { staticCursors, animatedCursors, svgsDir, bitmapsDir, animatedClip };
|
// Cursors
|
||||||
|
const staticCursors = readdirSync(staticCursorsDir).map((f) =>
|
||||||
|
resolve(staticCursorsDir, f)
|
||||||
|
);
|
||||||
|
const animatedCursors = readdirSync(animatedCursorsDir).map((f) =>
|
||||||
|
resolve(animatedCursorsDir, f)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Animated Config
|
||||||
|
const animatedClip = {
|
||||||
|
x: 4,
|
||||||
|
y: 4,
|
||||||
|
width: 200,
|
||||||
|
height: 200,
|
||||||
|
};
|
||||||
|
export { staticCursors, animatedCursors, bitmapsDir, animatedClip };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue