Skip to content

Commit

Permalink
fix: make "use" config optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Feb 26, 2024
1 parent 02f9396 commit eea8083
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cbmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const cliApp = async () => {
for await (const [key, config] of Object.entries(configs)) {
console.log(`${chalk.blueBright.bold("[+]")} Parsing ${key} Config...`);

if (options.puppeteer || config.use.toLowerCase() === "puppeteer") {
if (options.puppeteer || config.use?.toLowerCase() === "puppeteer") {
await renderer.renderPngsWithPuppeteer(config.dir, config.out, {
colors: config.colors,
fps: options.fps || config.fps,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/parseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from "path";
import { Color } from "./colorSvg.js";

export type Config = {
use: "puppeteer" | "default";
use?: "puppeteer" | "default";
colors?: Color[];
dir: string;
fps?: number;
Expand Down

0 comments on commit eea8083

Please sign in to comment.