(importStatement: string)
| 264 | } |
| 265 | |
| 266 | function extractComponentsFromImport(importStatement: string): string[] { |
| 267 | const components: string[] = []; |
| 268 | const namedImportRegex = /{([^}]+)}/; |
| 269 | const match = importStatement.match(namedImportRegex); |
| 270 | |
| 271 | if (match) { |
| 272 | components.push(...match[1].split(',').map(c => c.trim())); |
| 273 | } else { |
| 274 | const defaultImportRegex = /import\s+(\w+)/; |
| 275 | const defaultMatch = importStatement.match(defaultImportRegex); |
| 276 | if (defaultMatch) { |
| 277 | components.push(defaultMatch[1]); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | return components; |
| 282 | } |
| 283 | |
| 284 | function extractCssVars(content: string): Schema['cssVars'] { |
| 285 | const cssVarsRegex = /\/\/ @cssVars: (\{.*\})/; |
no outgoing calls
no test coverage detected