Skip to content

MdxGenerator

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/apps/cli/src/generators/mdx.generator.ts

MDX Generator class Generates MDX documentation from entities

Methods

MethodSignatureReturns
generategenerate()Promise<void>
generateContentgenerateContent()Promise<{ pages: DocPage[]; navigation: NavItem[] }>

Where it refuses work

  • MdxGenerator stops the work with an early return when deploymentDiagram.nodes.length > 0.
  • MdxGenerator stops the work with an early return when diagram.
  • MdxGenerator stops the work with an early return when !this.options.includeRelationships || relationships.length === 0.
  • MdxGenerator stops the work with an early return when !name || typeof name !== 'string'.
  • MdxGenerator stops the work with an early return when parts.length > 3.

When something fails

  • MdxGenerator handles failure in 6 places: it turns it into a return value in all 6.

Was this page helpful?

Download as PDF