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
  af7447ce_3295_6173_2897_ddd297a6bfb9["migrate()"]
  e39bed3f_bfbf_a8c6_90a0_aa2ce3be1ef4["migrate.ts"]
  af7447ce_3295_6173_2897_ddd297a6bfb9 -->|defined in| e39bed3f_bfbf_a8c6_90a0_aa2ce3be1ef4
  6d8d6d7e_6e94_511f_8419_616e12ba69b8["migrateAtApply()"]
  6d8d6d7e_6e94_511f_8419_616e12ba69b8 -->|calls| af7447ce_3295_6173_2897_ddd297a6bfb9
  f18844e7_09bc_0235_ac39_82d8fe0af50c["migrateContents()"]
  af7447ce_3295_6173_2897_ddd297a6bfb9 -->|calls| f18844e7_09bc_0235_ac39_82d8fe0af50c
  style af7447ce_3295_6173_2897_ddd297a6bfb9 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