getPackageInfo() — ui Function Reference
Architecture documentation for the getPackageInfo() function in get-package-info.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD dc6d30a2_3ecf_3e98_c938_d8b303ce4719["getPackageInfo()"] 29fcaa88_eb0c_ce0b_1e7d_fd4769cdc803["get-package-info.ts"] dc6d30a2_3ecf_3e98_c938_d8b303ce4719 -->|defined in| 29fcaa88_eb0c_ce0b_1e7d_fd4769cdc803 style dc6d30a2_3ecf_3e98_c938_d8b303ce4719 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/utils/get-package-info.ts lines 5–14
export function getPackageInfo(
cwd: string = "",
shouldThrow: boolean = true
): PackageJson | null {
const packageJsonPath = path.join(cwd, "package.json")
return fs.readJSONSync(packageJsonPath, {
throws: shouldThrow,
}) as PackageJson
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getPackageInfo() do?
getPackageInfo() is a function in the ui codebase, defined in packages/shadcn/src/utils/get-package-info.ts.
Where is getPackageInfo() defined?
getPackageInfo() is defined in packages/shadcn/src/utils/get-package-info.ts at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free