getComponentSourceFileContent() — supabase Function Reference
Architecture documentation for the getComponentSourceFileContent() function in rehype-component.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD c86e4773_fd0c_baae_3ad4_6b5af8d685ba["getComponentSourceFileContent()"] a71fbe19_1686_9a27_a797_c6a880ab3ca6["rehypeComponent()"] a71fbe19_1686_9a27_a797_c6a880ab3ca6 -->|calls| c86e4773_fd0c_baae_3ad4_6b5af8d685ba 74eb8725_5912_5751_740c_b3c8d06842bd["getNodeAttributeByName()"] c86e4773_fd0c_baae_3ad4_6b5af8d685ba -->|calls| 74eb8725_5912_5751_740c_b3c8d06842bd style c86e4773_fd0c_baae_3ad4_6b5af8d685ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/design-system/lib/rehype-component.ts lines 335–348
function getComponentSourceFileContent(node: UnistNode) {
const src = getNodeAttributeByName(node, 'src')?.value as string
if (!src) {
return null
}
// Read the source file.
const filePath = path.join(process.cwd(), src)
console.log('filePath', filePath)
const source = fs.readFileSync(filePath, 'utf8')
return source
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does getComponentSourceFileContent() do?
getComponentSourceFileContent() is a function in the supabase codebase.
What does getComponentSourceFileContent() call?
getComponentSourceFileContent() calls 1 function(s): getNodeAttributeByName.
What calls getComponentSourceFileContent()?
getComponentSourceFileContent() is called by 1 function(s): rehypeComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free