parentPaths() — tailwindcss Function Reference
Architecture documentation for the parentPaths() function in prepare-config.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD df7fe510_fe45_e2c0_c3ca_4388536da642["parentPaths()"] 505fd744_81c1_a3d8_bae0_2cbba00f74d3["detectConfigPath()"] 505fd744_81c1_a3d8_bae0_2cbba00f74d3 -->|calls| df7fe510_fe45_e2c0_c3ca_4388536da642 style df7fe510_fe45_e2c0_c3ca_4388536da642 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.
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