From 2d7e84af0957cd7f6ca2d0a69aee825758ed1054 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+KaizIqbal@users.noreply.github.com> Date: Sun, 16 Aug 2020 12:31:52 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=81=20Out=20Directory=20naming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/round/src/helpers/schema.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/round/src/helpers/schema.ts b/packages/round/src/helpers/schema.ts index 131ad957..1da515e0 100644 --- a/packages/round/src/helpers/schema.ts +++ b/packages/round/src/helpers/schema.ts @@ -3,15 +3,18 @@ import path from "path"; import rimraf from "rimraf"; import { staticCursors, animatedCursors, animatedClip } from "../cursors.json"; -import { rawSvgsDir } from "../config"; -import { ColorSchemas } from "../types"; +import { ColorSchema } from "../types"; -const generateConfigs = (colorSchemes: ColorSchemas) => { +const generateConfigs = ( + colorSchemes: ColorSchema, + dirPrefix: string, + rawSvgsDir: string +) => { const configs: any = []; for (let [schema] of Object.entries(colorSchemes)) { const { base, outline } = colorSchemes[schema]; - const schemaName = `Bibata_${schema}`; + const schemaName = `${dirPrefix} ${schema}`; const schemaSvgsPath = path.resolve("./src/svg", schemaName); @@ -32,11 +35,7 @@ const generateConfigs = (colorSchemes: ColorSchemas) => { .readFileSync(path.resolve(rawSvgsDir, svgFile), "utf-8") .toString(); - content = content - .replace("black", base) - .replace("white", outline) - .replace("#000000", base) - .replace("#ffffff", outline); + content = content.replace("#00FF00", base).replace("#0000FF", outline); // Writing new svg fs.writeFileSync(filePath, content, "utf-8");