♻ spinner customize

This commit is contained in:
ful1e5 2020-08-19 17:01:45 +05:30
parent e242869da1
commit 0e7f39e0fb

View file

@ -1,23 +1,26 @@
import chalk from "chalk";
import { renderCursors, spinner } from "shared";
import { generateConfigs } from "./helpers/schema";
import { colorSchemes } from "./color";
import { colorSchemes, bitmapsPath } from "./color";
(async () => {
const prefix = "Bibata-Round";
const configs = generateConfigs(colorSchemes, prefix);
try {
for (let [schema] of Object.entries(configs)) {
spinner.text = `Generating ${prefix}-${schema} bitmaps`;
spinner.text = `Generating ${chalk.magentaBright(
`${prefix}-${schema}`
)} bitmaps ...`;
spinner.start();
await renderCursors(configs[schema]);
spinner.succeed();
}
console.log("\n🎉 Render Done.");
console.log(`🎉 Bitmaps stored at ${bitmapsPath}`);
} catch (error) {
spinner.fail();
console.error(error);