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
  b98b015a_6c16_4645_12a4_71f4d20efb4e["analyzeImportPaths()"]
  6a659766_1d3a_b133_2d7b_62f11f4e9450["analyze()"]
  6a659766_1d3a_b133_2d7b_62f11f4e9450 -->|calls| b98b015a_6c16_4645_12a4_71f4d20efb4e
  167bc2f5_82ee_55d8_61ef_375469ed7094["pathsToRoot()"]
  b98b015a_6c16_4645_12a4_71f4d20efb4e -->|calls| 167bc2f5_82ee_55d8_61ef_375469ed7094
  style b98b015a_6c16_4645_12a4_71f4d20efb4e 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