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
  046679c3_bf1c_c3e5_7a64_9181e0909da0["migrate()"]
  75ba60a9_2614_1c57_ad40_3663d4315f3b["migrate.ts"]
  046679c3_bf1c_c3e5_7a64_9181e0909da0 -->|defined in| 75ba60a9_2614_1c57_ad40_3663d4315f3b
  66e0bbad_4b95_c393_4a95_0a694140aecd["migrateAtApply()"]
  66e0bbad_4b95_c393_4a95_0a694140aecd -->|calls| 046679c3_bf1c_c3e5_7a64_9181e0909da0
  404037a5_0bed_880c_5e9a_954d7ffbf6d7["migrateContents()"]
  046679c3_bf1c_c3e5_7a64_9181e0909da0 -->|calls| 404037a5_0bed_880c_5e9a_954d7ffbf6d7
  style 046679c3_bf1c_c3e5_7a64_9181e0909da0 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, defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate.ts.
Where is migrate() defined?
migrate() is defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate.ts at line 122.
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