Home / Function/ loadSync() — tailwindcss Function Reference

loadSync() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7b77858e_ca4f_a550_ad82_d0815acce8e3["loadSync()"]
  c890fa7b_6e17_4e5d_74bf_b797d0f757b8["Stylesheet"]
  7b77858e_ca4f_a550_ad82_d0815acce8e3 -->|defined in| c890fa7b_6e17_4e5d_74bf_b797d0f757b8
  60cad534_12fe_6e72_4bc7_443aad14536b["analyze()"]
  60cad534_12fe_6e72_4bc7_443aad14536b -->|calls| 7b77858e_ca4f_a550_ad82_d0815acce8e3
  style 7b77858e_ca4f_a550_ad82_d0815acce8e3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/stylesheet.ts lines 78–85

  static loadSync(filepath: string) {
    filepath = path.resolve(process.cwd(), filepath)

    let css = fsSync.readFileSync(filepath, 'utf-8')
    let root = postcss.parse(css, { from: filepath })

    return new Stylesheet(root, filepath)
  }

Subdomains

Called By

Frequently Asked Questions

What does loadSync() do?
loadSync() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/stylesheet.ts.
Where is loadSync() defined?
loadSync() is defined in packages/@tailwindcss-upgrade/src/stylesheet.ts at line 78.
What calls loadSync()?
loadSync() 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