(inputDir: string)
| 253 | let configPathCache = new Map<string, string | null>() |
| 254 | |
| 255 | function findClosestJsConfig(inputDir: string): string | null { |
| 256 | // Check cache for this directory |
| 257 | let cached = configPathCache.get(inputDir) |
| 258 | if (cached !== undefined) { |
| 259 | return cached |
| 260 | } |
| 261 | |
| 262 | // Resolve |
| 263 | let configPath: string | null = null |
| 264 | try { |
| 265 | let foundPath = escalade(inputDir, (_, names) => { |
| 266 | if (names.includes('tailwind.config.js')) return 'tailwind.config.js' |
| 267 | if (names.includes('tailwind.config.cjs')) return 'tailwind.config.cjs' |
| 268 | if (names.includes('tailwind.config.mjs')) return 'tailwind.config.mjs' |
| 269 | if (names.includes('tailwind.config.ts')) return 'tailwind.config.ts' |
| 270 | }) |
| 271 | configPath = foundPath ?? null |
| 272 | } catch {} |
| 273 | |
| 274 | // Cache all directories from inputDir up to config location |
| 275 | if (configPath) { |
| 276 | cacheForDirs(configPathCache, inputDir, configPath, path.dirname(configPath)) |
| 277 | } else { |
| 278 | configPathCache.set(inputDir, null) |
| 279 | } |
| 280 | |
| 281 | return configPath |
| 282 | } |
| 283 | |
| 284 | function resolveStylesheet(stylesheetPath: string | null, base: string): string | null { |
| 285 | if (!stylesheetPath) return null |
no test coverage detected
searching dependent graphs…