mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-14 15:15:02 -04:00
🔧 Source .svg from json data
This commit is contained in:
parent
0651684559
commit
bb35cdaa83
1 changed files with 4 additions and 9 deletions
|
@ -1,18 +1,13 @@
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import { cursors } from "./cursors.json";
|
||||||
|
|
||||||
// Source Directory
|
// Source Directory
|
||||||
const svgsDir = path.resolve(__dirname, "svg");
|
const svgsDir = path.resolve(__dirname, "svg");
|
||||||
|
|
||||||
// .svg
|
// Resolve Paths for svg
|
||||||
let svgs = fs
|
const svgs = cursors.map((svg: string) => path.resolve(svgsDir, svg));
|
||||||
.readdirSync(svgsDir)
|
|
||||||
.filter((file) => path.extname(file) === ".svg");
|
|
||||||
svgs = svgs.map((svg: string) => path.resolve(svgsDir, svg));
|
|
||||||
|
|
||||||
const animatedCursor = ["watch", "left_ptr_watch"];
|
|
||||||
|
|
||||||
// Out Directory
|
// Out Directory
|
||||||
const bitmapsDir = path.resolve(process.cwd(), "bitmaps");
|
const bitmapsDir = path.resolve(process.cwd(), "bitmaps");
|
||||||
|
|
||||||
export { svgs, animatedCursor, bitmapsDir };
|
export { svgs, bitmapsDir };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue