Home / Function/ migrate() — tailwindcss Function Reference

migrate() — tailwindcss Function Reference

Architecture documentation for the migrate() function in migrate.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  a6633139_ebc1_9ae0_25b2_81b98419e559["migrate()"]
  03d4ca08_7ec2_689c_47d8_1be20f931aa5["migrateAtApply()"]
  03d4ca08_7ec2_689c_47d8_1be20f931aa5 -->|calls| a6633139_ebc1_9ae0_25b2_81b98419e559
  079e0035_1ce3_3d9d_3017_71b47a7375a1["migrateContents()"]
  a6633139_ebc1_9ae0_25b2_81b98419e559 -->|calls| 079e0035_1ce3_3d9d_3017_71b47a7375a1
  style a6633139_ebc1_9ae0_25b2_81b98419e559 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/template/migrate.ts lines 122–130

export async function migrate(designSystem: DesignSystem, userConfig: Config | null, file: string) {
  let fullPath = path.isAbsolute(file) ? file : path.resolve(process.cwd(), file)
  let contents = await fs.readFile(fullPath, 'utf-8')

  await fs.writeFile(
    fullPath,
    await migrateContents(designSystem, userConfig, contents, extname(file)),
  )
}

Subdomains

Called By

Frequently Asked Questions

What does migrate() do?
migrate() is a function in the tailwindcss codebase.
What does migrate() call?
migrate() calls 1 function(s): migrateContents.
What calls migrate()?
migrate() is called by 1 function(s): migrateAtApply.

Analyze Your Own Codebase

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

Try Supermodel Free