mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-30 06:45:31 -04:00
🛠 compact main method
This commit is contained in:
parent
6d183b2d80
commit
32d03e86bf
1 changed files with 6 additions and 23 deletions
|
@ -1,33 +1,16 @@
|
||||||
import chalk from "chalk";
|
// import { renderCursors, spinner } from "common";
|
||||||
import { renderCursors, spinner } from "common";
|
|
||||||
|
|
||||||
import { generateConfigs } from "./utils/schema";
|
import { generateConfigs } from "./utils/schema";
|
||||||
import { colorSchemes } from "./color";
|
import * as colorsConfig from "./color";
|
||||||
import { bitmapsPath } from "./config";
|
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
const prefix = "Bibata-Round";
|
const themeName = "Bibata-Round";
|
||||||
|
|
||||||
const configs = generateConfigs(colorSchemes, prefix);
|
const configs = generateConfigs(colorsConfig.colorSchemes, themeName);
|
||||||
|
|
||||||
try {
|
console.log(configs);
|
||||||
for (let [schema] of Object.entries(configs)) {
|
|
||||||
spinner.text = `Generating ${chalk.magentaBright(
|
|
||||||
`${prefix}-${schema}`
|
|
||||||
)} bitmaps ...`;
|
|
||||||
spinner.start();
|
|
||||||
|
|
||||||
await renderCursors(configs[schema]);
|
process.exit(0);
|
||||||
|
|
||||||
spinner.succeed();
|
|
||||||
}
|
|
||||||
console.log(`🎉 Bitmaps stored at ${chalk.greenBright(bitmapsPath)}`);
|
|
||||||
} catch (error) {
|
|
||||||
spinner.fail();
|
|
||||||
console.error(error);
|
|
||||||
} finally {
|
|
||||||
process.exit(0);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue