diff --git a/packages/round/package.json b/packages/round/package.json index bd67071d..6c080745 100644 --- a/packages/round/package.json +++ b/packages/round/package.json @@ -4,7 +4,7 @@ "description": "Rounded Corner Bibata 🏳️‍🌈", "main": "index.js", "scripts": { - "clean": "rm -rf ./src/svg/Bibata-* ./bitmaps", + "clean": "rm -rf ./src/svg/Bibata-* .../../bitmaps", "dev": "nodemon src/index.ts", "dev:debug": "nodemon --inspect src/index.ts", "build": "yarn clean && npx tsc --build", diff --git a/packages/round/src/color.ts b/packages/round/src/color.ts index 32a7282b..e1e15344 100644 --- a/packages/round/src/color.ts +++ b/packages/round/src/color.ts @@ -2,6 +2,10 @@ import path from "path"; import { ColorSchema } from "./types"; +// --------------------------------------- Bitmaps/out Path 🔗 + +const bitmapsPath = path.resolve("../../bitmpaps"); + // --------------------------------------- Paths 🔗 const rawSvgsDir = path.resolve("src", "svg", "raw"); @@ -31,4 +35,4 @@ const colorSchemes: ColorSchema = { } }; -export { rawSvgsDir, schemesPath, colorSchemes }; +export { rawSvgsDir, bitmapsPath, schemesPath, colorSchemes }; diff --git a/packages/round/src/helpers/schema.ts b/packages/round/src/helpers/schema.ts index 3aabcca9..ebcff757 100644 --- a/packages/round/src/helpers/schema.ts +++ b/packages/round/src/helpers/schema.ts @@ -2,7 +2,7 @@ import fs from "fs"; import path from "path"; import { staticCursors, animatedCursors, animatedClip } from "../cursors.json"; -import { schemesPath } from "../color"; +import { schemesPath, bitmapsPath } from "../color"; import { ColorSchema, Configs } from "../types"; // --------------------------------------- Generate Configs 🛠 @@ -65,7 +65,7 @@ const generateConfigs = ( } // Creating Dir for store bitmaps - const bitmapsDir = path.resolve(process.cwd(), "bitmaps", schemaName); + const bitmapsDir = path.resolve(bitmapsPath, schemaName); fs.mkdirSync(bitmapsDir, { recursive: true }); // push config to Object