mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-20 18:25:13 -04:00
🌈 cleanup
This commit is contained in:
parent
5dab2ab9ab
commit
dff9c3f7f3
1 changed files with 3 additions and 15 deletions
|
@ -1,6 +1,5 @@
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import rimraf from "rimraf";
|
|
||||||
|
|
||||||
import { staticCursors, animatedCursors, animatedClip } from "../cursors.json";
|
import { staticCursors, animatedCursors, animatedClip } from "../cursors.json";
|
||||||
import { schemesPath } from "../config";
|
import { schemesPath } from "../config";
|
||||||
|
@ -15,16 +14,10 @@ const generateConfigs = (
|
||||||
|
|
||||||
for (let [schema] of Object.entries(colorSchemes)) {
|
for (let [schema] of Object.entries(colorSchemes)) {
|
||||||
const { base, outline, watchBackground } = colorSchemes[schema];
|
const { base, outline, watchBackground } = colorSchemes[schema];
|
||||||
const schemaName = `${dirPrefix} ${schema}`;
|
const schemaName = `${dirPrefix}-${schema}`;
|
||||||
|
|
||||||
const schemaSvgsPath = path.resolve(schemesPath, schemaName);
|
const schemaSvgsPath = path.resolve(schemesPath, schemaName);
|
||||||
|
|
||||||
if (fs.existsSync(schemaSvgsPath)) {
|
|
||||||
rimraf(schemaSvgsPath, function () {});
|
|
||||||
fs.mkdirSync(schemaSvgsPath, { recursive: true });
|
fs.mkdirSync(schemaSvgsPath, { recursive: true });
|
||||||
} else {
|
|
||||||
fs.mkdirSync(schemaSvgsPath, { recursive: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
// Static .svg generation
|
// Static .svg generation
|
||||||
staticCursors.map((cursor: string) => {
|
staticCursors.map((cursor: string) => {
|
||||||
|
@ -59,12 +52,7 @@ const generateConfigs = (
|
||||||
}
|
}
|
||||||
|
|
||||||
const bitmapsDir = path.resolve(process.cwd(), "bitmaps", schemaName);
|
const bitmapsDir = path.resolve(process.cwd(), "bitmaps", schemaName);
|
||||||
if (fs.existsSync(bitmapsDir)) {
|
|
||||||
rimraf(bitmapsDir, function () {});
|
|
||||||
fs.mkdirSync(bitmapsDir, { recursive: true });
|
fs.mkdirSync(bitmapsDir, { recursive: true });
|
||||||
} else {
|
|
||||||
fs.mkdirSync(bitmapsDir, { recursive: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
configs[schema] = {
|
configs[schema] = {
|
||||||
svgsDir: schemaSvgsPath,
|
svgsDir: schemaSvgsPath,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue