getFileTarget() — ui Function Reference
Architecture documentation for the getFileTarget() function in registry.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD fe88349e_c88d_cdd1_747a_8d44286b2b18["getFileTarget()"] c2827044_b928_a1b2_3033_3282c0588350["registry.ts"] fe88349e_c88d_cdd1_747a_8d44286b2b18 -->|defined in| c2827044_b928_a1b2_3033_3282c0588350 9048841a_f467_e053_7d9c_7b747f2eff93["fixFilePaths()"] 9048841a_f467_e053_7d9c_7b747f2eff93 -->|calls| fe88349e_c88d_cdd1_747a_8d44286b2b18 style fe88349e_c88d_cdd1_747a_8d44286b2b18 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/lib/registry.ts lines 134–161
function getFileTarget(file: z.infer<typeof registryItemFileSchema>) {
let target = file.target
if (!target || target === "") {
const fileName = file.path.split("/").pop()
if (
file.type === "registry:block" ||
file.type === "registry:component" ||
file.type === "registry:example"
) {
target = `components/${fileName}`
}
if (file.type === "registry:ui") {
target = `components/ui/${fileName}`
}
if (file.type === "registry:hook") {
target = `hooks/${fileName}`
}
if (file.type === "registry:lib") {
target = `lib/${fileName}`
}
}
return target ?? ""
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getFileTarget() do?
getFileTarget() is a function in the ui codebase, defined in deprecated/www/lib/registry.ts.
Where is getFileTarget() defined?
getFileTarget() is defined in deprecated/www/lib/registry.ts at line 134.
What calls getFileTarget()?
getFileTarget() is called by 1 function(s): fixFilePaths.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free