Home / Function/ detectJSConfigPath() — tailwindcss Function Reference

detectJSConfigPath() — tailwindcss Function Reference

Architecture documentation for the detectJSConfigPath() function in migrate-postcss.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  3fbb522f_26f0_74e8_421c_8d9677121a34["detectJSConfigPath()"]
  9434c276_afef_dc51_650b_a8b408f077fc["migrate-postcss.ts"]
  3fbb522f_26f0_74e8_421c_8d9677121a34 -->|defined in| 9434c276_afef_dc51_650b_a8b408f077fc
  0cb85618_1b33_b9dc_ae2b_1bc3e6bd6069["migratePostCSSConfig()"]
  0cb85618_1b33_b9dc_ae2b_1bc3e6bd6069 -->|calls| 3fbb522f_26f0_74e8_421c_8d9677121a34
  style 3fbb522f_26f0_74e8_421c_8d9677121a34 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/config/migrate-postcss.ts lines 306–315

async function detectJSConfigPath(base: string): Promise<null | string> {
  for (let file of JS_CONFIG_FILE_LOCATIONS) {
    let fullPath = path.resolve(base, file)
    try {
      await fs.access(fullPath)
      return fullPath
    } catch {}
  }
  return null
}

Subdomains

Frequently Asked Questions

What does detectJSConfigPath() do?
detectJSConfigPath() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/config/migrate-postcss.ts.
Where is detectJSConfigPath() defined?
detectJSConfigPath() is defined in packages/@tailwindcss-upgrade/src/codemods/config/migrate-postcss.ts at line 306.
What calls detectJSConfigPath()?
detectJSConfigPath() is called by 1 function(s): migratePostCSSConfig.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free