mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-14 07:04:47 -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 fs from "fs";
|
||||
import { cursors } from "./cursors.json";
|
||||
|
||||
// Source Directory
|
||||
const svgsDir = path.resolve(__dirname, "svg");
|
||||
|
||||
// .svg
|
||||
let svgs = fs
|
||||
.readdirSync(svgsDir)
|
||||
.filter((file) => path.extname(file) === ".svg");
|
||||
svgs = svgs.map((svg: string) => path.resolve(svgsDir, svg));
|
||||
|
||||
const animatedCursor = ["watch", "left_ptr_watch"];
|
||||
// Resolve Paths for svg
|
||||
const svgs = cursors.map((svg: string) => path.resolve(svgsDir, svg));
|
||||
|
||||
// Out Directory
|
||||
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