Home / Function/ analyzeImportPaths() — tailwindcss Function Reference

analyzeImportPaths() — tailwindcss Function Reference

Architecture documentation for the analyzeImportPaths() function in stylesheet.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  65bf5d7b_4133_6a0b_291b_ac92d67c696b["analyzeImportPaths()"]
  b9897393_3e36_7806_d172_b9debcd215f6["Stylesheet"]
  65bf5d7b_4133_6a0b_291b_ac92d67c696b -->|defined in| b9897393_3e36_7806_d172_b9debcd215f6
  6d7d3a7a_08dc_88e4_0b4a_9f563d66e582["analyze()"]
  6d7d3a7a_08dc_88e4_0b4a_9f563d66e582 -->|calls| 65bf5d7b_4133_6a0b_291b_ac92d67c696b
  e0e4bc64_eafc_ed6c_bc8e_0da0dbd6dc2a["pathsToRoot()"]
  65bf5d7b_4133_6a0b_291b_ac92d67c696b -->|calls| e0e4bc64_eafc_ed6c_bc8e_0da0dbd6dc2a
  style 65bf5d7b_4133_6a0b_291b_ac92d67c696b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/stylesheet.ts lines 222–243

  analyzeImportPaths() {
    let convertiblePaths: StylesheetConnection[][] = []
    let nonConvertiblePaths: StylesheetConnection[][] = []

    for (let path of this.pathsToRoot()) {
      let isConvertible = false

      for (let { meta } of path) {
        for (let layer of meta.layers) {
          isConvertible ||= layer === 'utilities' || layer === 'components'
        }
      }

      if (isConvertible) {
        convertiblePaths.push(path)
      } else {
        nonConvertiblePaths.push(path)
      }
    }

    return { convertiblePaths, nonConvertiblePaths }
  }

Subdomains

Called By

Frequently Asked Questions

What does analyzeImportPaths() do?
analyzeImportPaths() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/stylesheet.ts.
Where is analyzeImportPaths() defined?
analyzeImportPaths() is defined in packages/@tailwindcss-upgrade/src/stylesheet.ts at line 222.
What does analyzeImportPaths() call?
analyzeImportPaths() calls 1 function(s): pathsToRoot.
What calls analyzeImportPaths()?
analyzeImportPaths() is called by 1 function(s): analyze.

Analyze Your Own Codebase

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

Try Supermodel Free