Skip to content

VueDetector

reference
1 min readUpdated

Kind: Class

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

Vue Detector

Methods

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

Where it refuses work

  • VueDetector stops the work with an early return when filePath.endsWith('.vue').
  • VueDetector stops the work with an early return when /defineComponent\s*\(/.test(code).
  • VueDetector stops the work with an early return when /from\s+['"]vue['"]/.test(code).
  • VueDetector stops the work with an early return when /<script\s+setup/.test(code).
  • VueDetector stops the work with an early return when /setup\s*\(\s*(?:props|context)?\s*\)\s*\{/.test(code).
  • VueDetector stops the work with an early return when /data\s*\(\s*\)\s*\{[\s\S]*return\s*\{/.test(code) || /methods\s*:\s*\{/.test(code).

Was this page helpful?

Download as PDF