mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-06-06 09:31:29 -04:00
📂 Directory & Cursors config
This commit is contained in:
parent
1b76ffdae5
commit
6f5920d2e2
4 changed files with 29 additions and 11 deletions
27
packages/round/src/config.ts
Normal file
27
packages/round/src/config.ts
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import { resolve } from "path";
|
||||||
|
import { readdirSync } from "fs";
|
||||||
|
|
||||||
|
const rawSvgsDir = resolve("./src/svg");
|
||||||
|
const staticCursorsDir = resolve(rawSvgsDir, "static");
|
||||||
|
const animatedCursorsDir = resolve(rawSvgsDir, "animated");
|
||||||
|
|
||||||
|
const staticCursors = readdirSync(staticCursorsDir).map((f) =>
|
||||||
|
resolve(staticCursorsDir, f)
|
||||||
|
);
|
||||||
|
|
||||||
|
const animatedCursors = readdirSync(animatedCursorsDir).map((f) =>
|
||||||
|
resolve(animatedCursorsDir, f)
|
||||||
|
);
|
||||||
|
|
||||||
|
const schemesPath = resolve("schemes");
|
||||||
|
const projectRoot = resolve("../../");
|
||||||
|
const bitmapsPath = resolve(projectRoot, "bitmaps");
|
||||||
|
|
||||||
|
export {
|
||||||
|
rawSvgsDir,
|
||||||
|
schemesPath,
|
||||||
|
projectRoot,
|
||||||
|
bitmapsPath,
|
||||||
|
staticCursors,
|
||||||
|
animatedCursors
|
||||||
|
};
|
|
@ -3,7 +3,7 @@ import { renderCursors, spinner } from "common";
|
||||||
|
|
||||||
import { generateConfigs } from "./utils/schema";
|
import { generateConfigs } from "./utils/schema";
|
||||||
import { colorSchemes } from "./color";
|
import { colorSchemes } from "./color";
|
||||||
import { bitmapsPath } from "./paths";
|
import { bitmapsPath } from "./config";
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
const prefix = "Bibata-Round";
|
const prefix = "Bibata-Round";
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
import { resolve } from "path";
|
|
||||||
|
|
||||||
const rawSvgsDir = resolve("svg");
|
|
||||||
|
|
||||||
const schemesPath = resolve("schemes");
|
|
||||||
const projectRoot = resolve("../../");
|
|
||||||
const bitmapsPath = resolve(projectRoot, "bitmaps");
|
|
||||||
|
|
||||||
export { rawSvgsDir, schemesPath, projectRoot, bitmapsPath };
|
|
|
@ -3,7 +3,7 @@ import path from "path";
|
||||||
|
|
||||||
import { staticCursors, animatedCursors } from "../cursors.json";
|
import { staticCursors, animatedCursors } from "../cursors.json";
|
||||||
import { baseKeyColor, outlineKeyColor, watchKeyColor } from "../color";
|
import { baseKeyColor, outlineKeyColor, watchKeyColor } from "../color";
|
||||||
import { rawSvgsDir, schemesPath, bitmapsPath } from "../paths";
|
import { rawSvgsDir, schemesPath, bitmapsPath } from "../config";
|
||||||
import { ColorSchema, Config } from "../types";
|
import { ColorSchema, Config } from "../types";
|
||||||
|
|
||||||
// --------------------------------------- Generate Configs 🛠
|
// --------------------------------------- Generate Configs 🛠
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue