mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-20 18:25:13 -04:00
🏷️ typing
This commit is contained in:
parent
2ae0f8ea65
commit
f9ba957ee6
1 changed files with 4 additions and 4 deletions
|
@ -4,14 +4,14 @@ 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";
|
||||||
import { ColorSchema, Config } from "../types";
|
import { ColorSchema, Configs } from "../types";
|
||||||
|
|
||||||
const generateConfigs = (
|
const generateConfigs = (
|
||||||
colorSchemes: ColorSchema,
|
colorSchemes: ColorSchema,
|
||||||
dirPrefix: string,
|
dirPrefix: string,
|
||||||
rawSvgsDir: string
|
rawSvgsDir: string
|
||||||
) => {
|
) => {
|
||||||
const configs: Array<Config> = [];
|
const configs: Configs = {};
|
||||||
|
|
||||||
for (let [schema] of Object.entries(colorSchemes)) {
|
for (let [schema] of Object.entries(colorSchemes)) {
|
||||||
const { base, outline } = colorSchemes[schema];
|
const { base, outline } = colorSchemes[schema];
|
||||||
|
@ -52,13 +52,13 @@ const generateConfigs = (
|
||||||
);
|
);
|
||||||
if (!fs.existsSync(bitmapsDir)) fs.mkdirSync(bitmapsDir);
|
if (!fs.existsSync(bitmapsDir)) fs.mkdirSync(bitmapsDir);
|
||||||
|
|
||||||
configs.push({
|
configs[schema] = {
|
||||||
svgsDir: schemaSvgsPath,
|
svgsDir: schemaSvgsPath,
|
||||||
staticSvgs,
|
staticSvgs,
|
||||||
bitmapsDir,
|
bitmapsDir,
|
||||||
animatedCursors,
|
animatedCursors,
|
||||||
animatedClip
|
animatedClip
|
||||||
});
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("An error occurred in .svg files generation.");
|
console.error("An error occurred in .svg files generation.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue