Skip to content

UILibraryDetector

reference
1 min readUpdated

Kind: Class

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

UI Library Detector

Methods

MethodSignatureReturns
detectdetect(entities: Entity[])DetectedUIComponent[]
getSummarygetSummary(components: DetectedUIComponent[])UILibrarySummary[]
getComponentSummarygetComponentSummary(component: DetectedUIComponent)string

Where it refuses work

  • UILibraryDetector stops the work with an early return when !tagMatch, in 2 places.
  • UILibraryDetector stops the work with an early return when patterns.importPattern.test(code).
  • UILibraryDetector stops the work with an early return when /className\s*=\s*["'][^"']*(?:flex|grid|bg-|text-|p-|m-|w-|h-)/.test(code).
  • UILibraryDetector stops the work with an early return when seen.has(key).

Was this page helpful?

Download as PDF