From bb35cdaa83bcb690aee47fb57d2f8749bc227ce7 Mon Sep 17 00:00:00 2001 From: KaizIqbal <24286590+KaizIqbal@users.noreply.github.com> Date: Sat, 25 Jul 2020 18:16:10 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Source=20.svg=20from=20json=20da?= =?UTF-8?q?ta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/config.ts b/src/config.ts index c4dbd76..ca40d5f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,18 +1,13 @@ import path from "path"; -import fs from "fs"; +import { cursors } from "./cursors.json"; // Source Directory const svgsDir = path.resolve(__dirname, "svg"); -// .svg -let svgs = fs - .readdirSync(svgsDir) - .filter((file) => path.extname(file) === ".svg"); -svgs = svgs.map((svg: string) => path.resolve(svgsDir, svg)); - -const animatedCursor = ["watch", "left_ptr_watch"]; +// Resolve Paths for svg +const svgs = cursors.map((svg: string) => path.resolve(svgsDir, svg)); // Out Directory const bitmapsDir = path.resolve(process.cwd(), "bitmaps"); -export { svgs, animatedCursor, bitmapsDir }; +export { svgs, bitmapsDir };