Skip to content

SiteGenerator

reference
1 min readUpdated

Kind: Class

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

Static Site Generator

Methods

MethodSignatureReturns
generategenerate(metadata: ProjectMetadata, entities: Entity[], relationships: Relationship[])Promise<void>

Where it refuses work

  • SiteGenerator stops the work with an early return when !fs.existsSync(uiCoreBundlePath).
  • SiteGenerator stops the work with an early return when hasChildren.
  • SiteGenerator stops the work with an early return when !filePath || !fs.existsSync(filePath).
  • SiteGenerator stops the work with an early return when !str || typeof str !== 'string'.

When something fails

  • SiteGenerator handles failure in 3 places: it discards it silently in 2, and turns it into a return value in 1.

Was this page helpful?

Download as PDF