Skip to content

SvelteDetector

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/svelte-detector.ts

Svelte Detector

Methods

MethodSignatureReturns
detectdetect(entities: Entity[])DetectedSvelteComponent[]
getComponentSummarygetComponentSummary(component: DetectedSvelteComponent)string

Where it refuses work

  • SvelteDetector stops the work with an early return when filePath.endsWith('.svelte').
  • SvelteDetector stops the work with an early return when /\+page\.svelte|\+layout\.svelte|\+error\.svelte/.test(filePath).
  • SvelteDetector stops the work with an early return when !isPage && !isLayout.
  • SvelteDetector stops the work with an early return when score >= 3.
  • SvelteDetector stops the work with an early return when score >= 1.

Was this page helpful?

Download as PDF