Home / Function/ cleanupMarkers() — ui Function Reference

cleanupMarkers() — ui Function Reference

Architecture documentation for the cleanupMarkers() function in transform-cleanup.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  69d323c2_c5e0_0997_8cae_9e39a6771952["cleanupMarkers()"]
  e5d28271_9de7_c6c9_1240_13894663e9ec["transform-cleanup.ts"]
  69d323c2_c5e0_0997_8cae_9e39a6771952 -->|defined in| e5d28271_9de7_c6c9_1240_13894663e9ec
  182b5198_cbf0_43bf_ab80_22341899f430["applyCleanup()"]
  69d323c2_c5e0_0997_8cae_9e39a6771952 -->|calls| 182b5198_cbf0_43bf_ab80_22341899f430
  style 69d323c2_c5e0_0997_8cae_9e39a6771952 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/src/utils/transformers/transform-cleanup.ts lines 133–146

export async function cleanupMarkers(source: string) {
  const project = new Project({
    useInMemoryFileSystem: true,
  })

  const sourceFile = project.createSourceFile("component.tsx", source, {
    scriptKind: ScriptKind.TSX,
    overwrite: true,
  })

  applyCleanup(sourceFile)

  return sourceFile.getText()
}

Subdomains

Frequently Asked Questions

What does cleanupMarkers() do?
cleanupMarkers() is a function in the ui codebase, defined in packages/shadcn/src/utils/transformers/transform-cleanup.ts.
Where is cleanupMarkers() defined?
cleanupMarkers() is defined in packages/shadcn/src/utils/transformers/transform-cleanup.ts at line 133.
What does cleanupMarkers() call?
cleanupMarkers() calls 1 function(s): applyCleanup.

Analyze Your Own Codebase

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

Try Supermodel Free