Home / Function/ analyzeImportPaths() — tailwindcss Function Reference

analyzeImportPaths() — tailwindcss Function Reference

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

Function typescript RustCore FileScanner calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  07b8d21a_ae23_4142_b433_7694e785c6a7["analyzeImportPaths()"]
  4d72f15c_1184_4396_0a3a_6a120fe36ae0["analyze()"]
  4d72f15c_1184_4396_0a3a_6a120fe36ae0 -->|calls| 07b8d21a_ae23_4142_b433_7694e785c6a7
  d6f62274_b443_7cf5_a1aa_cdeda7702f06["pathsToRoot()"]
  07b8d21a_ae23_4142_b433_7694e785c6a7 -->|calls| d6f62274_b443_7cf5_a1aa_cdeda7702f06
  style 07b8d21a_ae23_4142_b433_7694e785c6a7 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 }
  }

Domain

Subdomains

Called By

Frequently Asked Questions

What does analyzeImportPaths() do?
analyzeImportPaths() is a function in the tailwindcss codebase.
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