Home / Function/ migrate() — tailwindcss Function Reference

migrate() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  13933c8a_90a1_ea2c_81f3_e03051600481["migrate()"]
  d42d902c_ed1a_408e_b745_e2810d7e1b4b["migrateAtApply()"]
  13933c8a_90a1_ea2c_81f3_e03051600481 -->|calls| d42d902c_ed1a_408e_b745_e2810d7e1b4b
  style 13933c8a_90a1_ea2c_81f3_e03051600481 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/css/migrate-at-apply.test.ts lines 12–34

async function migrate(input: string, config: Config = {}) {
  let designSystem = await __unstable__loadDesignSystem(
    css`
      @import 'tailwindcss';

      /* TODO(perf): Only here to speed up the tests */
      @theme {
        --*: initial;
      }
    `,
    { base: __dirname },
  )

  return postcss()
    .use(
      migrateAtApply({
        designSystem,
        userConfig: config,
      }),
    )
    .process(input, { from: expect.getState().testPath })
    .then((result) => result.css)
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free