Skip to content

Commit

Permalink
fix: skip unkown generators by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 5, 2024
1 parent 2b09de1 commit d28c5b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/automd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ export async function automd(_options: Partial<AutoMDOptions> = {}) {
),
);

const generatorName = args.generator || "jsdocs";
const generatorName = args.generator;
const generator = generators[generatorName];
if (!generator) {
throw new Error(`Unknown generator: \`${generatorName}\``);
// TODO: Warn?
continue;
}

const generateContext: GenerateContext = {
Expand Down

0 comments on commit d28c5b2

Please sign in to comment.