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