Home / Function/ isSimplePostCSSConfig() — tailwindcss Function Reference

isSimplePostCSSConfig() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9b92e9f3_86b4_7d10_9195_9ea04f2d8de4["isSimplePostCSSConfig()"]
  9c861556_2895_9b7c_50ec_d9aa3cfc5c68["migrate-postcss.ts"]
  9b92e9f3_86b4_7d10_9195_9ea04f2d8de4 -->|defined in| 9c861556_2895_9b7c_50ec_d9aa3cfc5c68
  cddc9c20_5880_3c1c_34a8_c38c746645b7["migratePostCSSJSConfig()"]
  cddc9c20_5880_3c1c_34a8_c38c746645b7 -->|calls| 9b92e9f3_86b4_7d10_9195_9ea04f2d8de4
  style 9b92e9f3_86b4_7d10_9195_9ea04f2d8de4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/config/migrate-postcss.ts lines 334–344

async function isSimplePostCSSConfig(configPath: string): Promise<boolean> {
  let content = await fs.readFile(configPath, 'utf-8')
  return (
    content.includes('tailwindcss:') &&
    !(
      content.includes('require') ||
      // Adding a space at the end to not match `'postcss-import'`
      content.includes('import ')
    )
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free