parentPaths() — tailwindcss Function Reference
Architecture documentation for the parentPaths() function in prepare-config.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 83deb7ef_c650_3d7d_4886_a0ff88211528["parentPaths()"] c8809718_3b35_1fdb_ff99_94e375c7360a["prepare-config.ts"] 83deb7ef_c650_3d7d_4886_a0ff88211528 -->|defined in| c8809718_3b35_1fdb_ff99_94e375c7360a 29edd669_83d1_d2aa_eab9_7e8139fc8b20["detectConfigPath()"] 29edd669_83d1_d2aa_eab9_7e8139fc8b20 -->|calls| 83deb7ef_c650_3d7d_4886_a0ff88211528 style 83deb7ef_c650_3d7d_4886_a0ff88211528 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/codemods/template/prepare-config.ts lines 114–133
function* parentPaths(from: string, to: string = from) {
let fromAbsolute = path.resolve(from)
let toAbsolute = path.resolve(to)
if (!fromAbsolute.startsWith(toAbsolute)) {
throw new Error(`The path ${from} is not a parent of ${to}`)
}
if (fromAbsolute === toAbsolute) {
yield fromAbsolute
return
}
let current = fromAbsolute
do {
yield current
current = path.dirname(current)
} while (current !== toAbsolute)
yield toAbsolute
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does parentPaths() do?
parentPaths() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/template/prepare-config.ts.
Where is parentPaths() defined?
parentPaths() is defined in packages/@tailwindcss-upgrade/src/codemods/template/prepare-config.ts at line 114.
What calls parentPaths()?
parentPaths() is called by 1 function(s): detectConfigPath.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free