Home / Function/ migrate() — tailwindcss Function Reference

migrate() — tailwindcss Function Reference

Architecture documentation for the migrate() function in migrate-tailwind-directives.test.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  691801e2_532e_484c_34a4_aad4e82d7102["migrate()"]
  320d991a_2688_e5d4_fc07_c946ad430e00["migrate-tailwind-directives.test.ts"]
  691801e2_532e_484c_34a4_aad4e82d7102 -->|defined in| 320d991a_2688_e5d4_fc07_c946ad430e00
  bfe5c1d2_37ed_49d0_ef27_f44b54dba6f3["migrateTailwindDirectives()"]
  691801e2_532e_484c_34a4_aad4e82d7102 -->|calls| bfe5c1d2_37ed_49d0_ef27_f44b54dba6f3
  bbbe5224_64f9_042a_8b85_2e287c62c4d1["sortBuckets()"]
  691801e2_532e_484c_34a4_aad4e82d7102 -->|calls| bbbe5224_64f9_042a_8b85_2e287c62c4d1
  9f6b611c_7303_0355_74f7_03283a44c6d0["formatNodes()"]
  691801e2_532e_484c_34a4_aad4e82d7102 -->|calls| 9f6b611c_7303_0355_74f7_03283a44c6d0
  style 691801e2_532e_484c_34a4_aad4e82d7102 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/css/migrate-tailwind-directives.test.ts lines 10–17

function migrate(input: string, options: { newPrefix: string | null } = { newPrefix: null }) {
  return postcss()
    .use(migrateTailwindDirectives(options))
    .use(sortBuckets())
    .use(formatNodes())
    .process(input, { from: expect.getState().testPath })
    .then((result) => result.css)
}

Subdomains

Frequently Asked Questions

What does migrate() do?
migrate() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/css/migrate-tailwind-directives.test.ts.
Where is migrate() defined?
migrate() is defined in packages/@tailwindcss-upgrade/src/codemods/css/migrate-tailwind-directives.test.ts at line 10.
What does migrate() call?
migrate() calls 3 function(s): formatNodes, migrateTailwindDirectives, sortBuckets.

Analyze Your Own Codebase

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

Try Supermodel Free