From dff9c3f7f3a9fe97a0f0418f4aec32322dda36c2 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+KaizIqbal@users.noreply.github.com> Date: Sun, 16 Aug 2020 18:45:27 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=88=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/round/src/helpers/schema.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/round/src/helpers/schema.ts b/packages/round/src/helpers/schema.ts index 3aaf009d..7f997b4c 100644 --- a/packages/round/src/helpers/schema.ts +++ b/packages/round/src/helpers/schema.ts @@ -1,6 +1,5 @@ import fs from "fs"; import path from "path"; -import rimraf from "rimraf"; import { staticCursors, animatedCursors, animatedClip } from "../cursors.json"; import { schemesPath } from "../config"; @@ -15,16 +14,10 @@ const generateConfigs = ( for (let [schema] of Object.entries(colorSchemes)) { const { base, outline, watchBackground } = colorSchemes[schema]; - const schemaName = `${dirPrefix} ${schema}`; + const schemaName = `${dirPrefix}-${schema}`; const schemaSvgsPath = path.resolve(schemesPath, schemaName); - - if (fs.existsSync(schemaSvgsPath)) { - rimraf(schemaSvgsPath, function () {}); - fs.mkdirSync(schemaSvgsPath, { recursive: true }); - } else { - fs.mkdirSync(schemaSvgsPath, { recursive: true }); - } + fs.mkdirSync(schemaSvgsPath, { recursive: true }); // Static .svg generation staticCursors.map((cursor: string) => { @@ -59,12 +52,7 @@ const generateConfigs = ( } const bitmapsDir = path.resolve(process.cwd(), "bitmaps", schemaName); - if (fs.existsSync(bitmapsDir)) { - rimraf(bitmapsDir, function () {}); - fs.mkdirSync(bitmapsDir, { recursive: true }); - } else { - fs.mkdirSync(bitmapsDir, { recursive: true }); - } + fs.mkdirSync(bitmapsDir, { recursive: true }); configs[schema] = { svgsDir: schemaSvgsPath,