Home / Function/ getMdxFiles() — supabase Function Reference

getMdxFiles() — supabase Function Reference

Architecture documentation for the getMdxFiles() function in build-llms-txt.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  92c31549_4d2a_ee9b_56cd_3f0d09f7b149["getMdxFiles()"]
  13bb9435_ca50_3c2a_2cdd_91ac8adefc34["getDocFiles()"]
  13bb9435_ca50_3c2a_2cdd_91ac8adefc34 -->|calls| 92c31549_4d2a_ee9b_56cd_3f0d09f7b149
  style 92c31549_4d2a_ee9b_56cd_3f0d09f7b149 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/learn/scripts/build-llms-txt.ts lines 31–45

function getMdxFiles(dir: string): string[] {
  const files: string[] = []
  const entries = fs.readdirSync(dir, { withFileTypes: true })

  for (const entry of entries) {
    const fullPath = path.join(dir, entry.name)
    if (entry.isDirectory()) {
      files.push(...getMdxFiles(fullPath))
    } else if (entry.name.endsWith('.mdx')) {
      files.push(fullPath)
    }
  }

  return files
}

Subdomains

Called By

Frequently Asked Questions

What does getMdxFiles() do?
getMdxFiles() is a function in the supabase codebase.
What calls getMdxFiles()?
getMdxFiles() is called by 1 function(s): getDocFiles.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free