🧰 Seprate Configs and Colors

This commit is contained in:
ful1e5 2020-08-31 11:30:33 +05:30
parent 316c3ea5af
commit b5686dc5e2
3 changed files with 31 additions and 50 deletions

View file

@ -1,61 +1,39 @@
import path from "path";
import { ColorSchema } from "./types"; import { ColorSchema } from "./types";
// --------------------------------------- Paths 🔗
const rawSvgsDir = path.resolve("svg");
// --------------------------------------- Config 🔧
const schemesPath = path.resolve("schemes");
const projectRoot = path.resolve("../../");
const bitmapsPath = path.resolve(projectRoot, "bitmaps");
const watchKeyColor = "#FF0000"; const watchKeyColor = "#FF0000";
const baseKeyColor = "#00FF00"; const baseKeyColor = "#00FF00";
const outlineKeyColor = "#0000FF"; const outlineKeyColor = "#0000FF";
// --------------------------------------- Colors✨
// Common Colors // Common Colors
const black = "#000000"; const black = "#000000";
const white = "#FFFFFF"; const white = "#FFFFFF";
// Schemes Colors // Schemes Colors
const amber = "#FF8300"; // const amber = "#FF8300";
const adwaita = "#272728"; // const adwaita = "#272728";
const breezeDark = "#4A4C49"; // const breezeDark = "#4A4C49";
// --------------------------------------- Schemes🌈
const colorSchemes: ColorSchema = { const colorSchemes: ColorSchema = {
Adwaita: { // Adwaita: {
base: adwaita, // base: adwaita,
outline: white // outline: white
}, // },
Amber: { // Amber: {
base: amber, // base: amber,
outline: white // outline: white
}, // },
Breeze: { // Breeze: {
base: breezeDark, // base: breezeDark,
outline: white // outline: white
}, // },
Classic: { // Classic: {
base: black, // base: black,
outline: white // outline: white
}, // },
Ice: { Ice: {
base: white, base: white,
outline: black outline: black
} }
}; };
export { export { watchKeyColor, baseKeyColor, outlineKeyColor, colorSchemes };
rawSvgsDir,
bitmapsPath,
schemesPath,
watchKeyColor,
baseKeyColor,
outlineKeyColor,
colorSchemes
};

View file

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

View file

@ -0,0 +1,9 @@
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 };