🚀 Main method with try&catch block

This commit is contained in:
ful1e5 2020-09-29 10:43:44 +05:30
parent 9b65b126a3
commit bd93321807
2 changed files with 32 additions and 14 deletions

View file

@ -2,12 +2,21 @@ import { createBitmaps } from "bibata-core";
import { themeColors } from "./colors";
import { resolve } from "path";
const projectRoot = resolve("../../");
const args = {
themeName: "Bibata-Modern",
svgDir: resolve("./src/svg"),
bitmapsDir: resolve(projectRoot, "bitmaps"),
themeColors
const main = async () => {
const projectRoot = resolve("../../");
const args = {
themeName: "Bibata-Modern",
svgDir: resolve("./src/svg"),
bitmapsDir: resolve(projectRoot, "bitmaps"),
themeColors
};
try {
await createBitmaps(args);
process.exit(0);
} catch (error) {
console.error(error);
}
};
createBitmaps(args);
main();