Kind: Class
Source: atloria-monorepo/apps/frontend-parser/src/parsers/vue.parser.ts
Implements: IParser
Methods
| Method | Signature | Returns |
|---|---|---|
initialize | initialize(config: ParserConfig) | Promise<void> |
canParse | canParse(filePath: string) | boolean |
parseFile | parseFile(filePath: string, content: string) | Promise<ParseResult> |
parseFiles | parseFiles(files: ParseFileInput[]) | Promise<ParseResult[]> |
destroy | destroy() | Promise<void> |
Properties
| Property | Type |
|---|---|
name | string |
version | string |
supportedPatterns | string[] |
Where it refuses work
VueParserstops the work with an early return when!this.canParse(filePath).VueParserstops the work with an early return when!fileContent.trim().VueParserstops the work with an early return when!scriptContent && !hasTemplate.VueParserstops the work with an early return when!scriptContent.trim().
When something fails
VueParserhandles failure in 4 places: it turns it into a return value in 2, logs it and continues in 1, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.
Was this page helpful?