mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-25 04:24:33 -04:00
🚀 Main method with try&catch block
This commit is contained in:
parent
9b65b126a3
commit
bd93321807
2 changed files with 32 additions and 14 deletions
|
@ -2,6 +2,7 @@ import { createBitmaps } from "bibata-core";
|
|||
import { themeColors } from "./colors";
|
||||
import { resolve } from "path";
|
||||
|
||||
const main = async () => {
|
||||
const projectRoot = resolve("../../");
|
||||
const args = {
|
||||
themeName: "Bibata-Modern",
|
||||
|
@ -10,4 +11,12 @@ const args = {
|
|||
themeColors
|
||||
};
|
||||
|
||||
createBitmaps(args);
|
||||
try {
|
||||
await createBitmaps(args);
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
main();
|
||||
|
|
|
@ -2,12 +2,21 @@ import { createBitmaps } from "bibata-core";
|
|||
import { themeColors } from "./colors";
|
||||
import { resolve } from "path";
|
||||
|
||||
const main = async () => {
|
||||
const projectRoot = resolve("../../");
|
||||
const args = {
|
||||
themeName: "Bibata-Modern",
|
||||
themeName: "Bibata-Original",
|
||||
svgDir: resolve("./src/svg"),
|
||||
bitmapsDir: resolve(projectRoot, "bitmaps"),
|
||||
themeColors
|
||||
};
|
||||
|
||||
createBitmaps(args);
|
||||
try {
|
||||
await createBitmaps(args);
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
main();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue