mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-06-05 01:13:40 -04:00
📂 Structure bitmaper
This commit is contained in:
parent
8ad5d2720e
commit
1108cfd7b4
71 changed files with 92 additions and 260 deletions
bitmap/src
23
bitmap/src/config.ts
Normal file
23
bitmap/src/config.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import path from "path";
|
||||
import { readdirSync, existsSync } from "fs";
|
||||
|
||||
// Directory resolve
|
||||
const projectRoot = path.resolve(__dirname, "../../");
|
||||
|
||||
const outDir = path.resolve(projectRoot, "pngs");
|
||||
const staticSvgDir = path.resolve(projectRoot, "svg", "static");
|
||||
const animatedSvgDir = path.resolve(projectRoot, "svg", "animated");
|
||||
|
||||
// Generate a svg list
|
||||
if (!existsSync(staticSvgDir) || !existsSync(animatedSvgDir)) {
|
||||
throw new Error("svg directory not found");
|
||||
}
|
||||
|
||||
const staticCursors = readdirSync(staticSvgDir).map((f) =>
|
||||
path.resolve(staticSvgDir, f)
|
||||
);
|
||||
const animatedCursors = readdirSync(animatedSvgDir).map((f) =>
|
||||
path.resolve(animatedSvgDir, f)
|
||||
);
|
||||
|
||||
export { staticCursors, animatedCursors, outDir };
|
Loading…
Add table
Add a link
Reference in a new issue