📂 Directory & Cursors config

This commit is contained in:
ful1e5 2020-08-31 11:52:18 +05:30
parent 1b76ffdae5
commit 6f5920d2e2
4 changed files with 29 additions and 11 deletions

View 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
};

View file

@ -3,7 +3,7 @@ import { renderCursors, spinner } from "common";
import { generateConfigs } from "./utils/schema";
import { colorSchemes } from "./color";
import { bitmapsPath } from "./paths";
import { bitmapsPath } from "./config";
const main = async () => {
const prefix = "Bibata-Round";

View file

@ -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 };

View file

@ -3,7 +3,7 @@ import path from "path";
import { staticCursors, animatedCursors } from "../cursors.json";
import { baseKeyColor, outlineKeyColor, watchKeyColor } from "../color";
import { rawSvgsDir, schemesPath, bitmapsPath } from "../paths";
import { rawSvgsDir, schemesPath, bitmapsPath } from "../config";
import { ColorSchema, Config } from "../types";
// --------------------------------------- Generate Configs 🛠