mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-28 05:54:21 -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 { colorSchemes } from "./color";
|
||||
import { bitmapsPath } from "./config";
|
||||
import * as colorsConfig from "./color";
|
||||
|
||||
const main = async () => {
|
||||
const prefix = "Bibata-Round";
|
||||
const themeName = "Bibata-Round";
|
||||
|
||||
const configs = generateConfigs(colorSchemes, prefix);
|
||||
const configs = generateConfigs(colorsConfig.colorSchemes, themeName);
|
||||
|
||||
try {
|
||||
for (let [schema] of Object.entries(configs)) {
|
||||
spinner.text = `Generating ${chalk.magentaBright(
|
||||
`${prefix}-${schema}`
|
||||
)} bitmaps ...`;
|
||||
spinner.start();
|
||||
console.log(configs);
|
||||
|
||||
await renderCursors(configs[schema]);
|
||||
|
||||
spinner.succeed();
|
||||
}
|
||||
console.log(`🎉 Bitmaps stored at ${chalk.greenBright(bitmapsPath)}`);
|
||||
} catch (error) {
|
||||
spinner.fail();
|
||||
console.error(error);
|
||||
} finally {
|
||||
process.exit(0);
|
||||
}
|
||||
process.exit(0);
|
||||
};
|
||||
|
||||
main();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue