🔗 Bitmaps path set to <root>

This commit is contained in:
ful1e5 2020-08-18 17:48:00 +05:30
parent f51561a3c0
commit 288276f42e
3 changed files with 8 additions and 4 deletions

View file

@ -4,7 +4,7 @@
"description": "Rounded Corner Bibata 🏳️‍🌈", "description": "Rounded Corner Bibata 🏳️‍🌈",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"clean": "rm -rf ./src/svg/Bibata-* ./bitmaps", "clean": "rm -rf ./src/svg/Bibata-* .../../bitmaps",
"dev": "nodemon src/index.ts", "dev": "nodemon src/index.ts",
"dev:debug": "nodemon --inspect src/index.ts", "dev:debug": "nodemon --inspect src/index.ts",
"build": "yarn clean && npx tsc --build", "build": "yarn clean && npx tsc --build",

View file

@ -2,6 +2,10 @@ import path from "path";
import { ColorSchema } from "./types"; import { ColorSchema } from "./types";
// --------------------------------------- Bitmaps/out Path 🔗
const bitmapsPath = path.resolve("../../bitmpaps");
// --------------------------------------- Paths 🔗 // --------------------------------------- Paths 🔗
const rawSvgsDir = path.resolve("src", "svg", "raw"); const rawSvgsDir = path.resolve("src", "svg", "raw");
@ -31,4 +35,4 @@ const colorSchemes: ColorSchema = {
} }
}; };
export { rawSvgsDir, schemesPath, colorSchemes }; export { rawSvgsDir, bitmapsPath, schemesPath, colorSchemes };

View file

@ -2,7 +2,7 @@ import fs from "fs";
import path from "path"; import path from "path";
import { staticCursors, animatedCursors, animatedClip } from "../cursors.json"; import { staticCursors, animatedCursors, animatedClip } from "../cursors.json";
import { schemesPath } from "../color"; import { schemesPath, bitmapsPath } from "../color";
import { ColorSchema, Configs } from "../types"; import { ColorSchema, Configs } from "../types";
// --------------------------------------- Generate Configs 🛠 // --------------------------------------- Generate Configs 🛠
@ -65,7 +65,7 @@ const generateConfigs = (
} }
// Creating Dir for store bitmaps // Creating Dir for store bitmaps
const bitmapsDir = path.resolve(process.cwd(), "bitmaps", schemaName); const bitmapsDir = path.resolve(bitmapsPath, schemaName);
fs.mkdirSync(bitmapsDir, { recursive: true }); fs.mkdirSync(bitmapsDir, { recursive: true });
// push config to Object // push config to Object