🗂 "bitmaps" Directory ensure

This commit is contained in:
KaizIqbal 2020-07-27 10:24:02 +05:30
parent 1a05881f4a
commit c9bc61b5a8

View file

@ -1,4 +1,5 @@
import path from "path"; import path from "path";
import fs from "fs";
import { staticCursors } from "./cursors.json"; import { staticCursors } from "./cursors.json";
// Source Directory // Source Directory
@ -11,5 +12,6 @@ const staticSvgs = staticCursors.map((svg: string) =>
// Out Directory // Out Directory
const bitmapsDir = path.resolve(process.cwd(), "bitmaps"); const bitmapsDir = path.resolve(process.cwd(), "bitmaps");
if (!fs.existsSync(bitmapsDir)) fs.mkdirSync(bitmapsDir);
export { staticSvgs, bitmapsDir }; export { staticSvgs, bitmapsDir };