Home / Function/ migrate() — tailwindcss Function Reference

migrate() — tailwindcss Function Reference

Architecture documentation for the migrate() function in migrate-modernize-arbitrary-values.test.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  587da7b6_5416_0d40_e253_cacc8175ca71["migrate()"]
  80bb9840_1d91_d6ca_549c_09209ffc25a6["migrate-modernize-arbitrary-values.test.ts"]
  587da7b6_5416_0d40_e253_cacc8175ca71 -->|defined in| 80bb9840_1d91_d6ca_549c_09209ffc25a6
  style 587da7b6_5416_0d40_e253_cacc8175ca71 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/template/migrate-modernize-arbitrary-values.test.ts lines 14–27

function migrate(designSystem: DesignSystem, userConfig: UserConfig | null, rawCandidate: string) {
  for (let migration of [
    migrateEmptyArbitraryValues,
    migratePrefix,
    migrateModernizeArbitraryValues,
    migrateArbitraryVariants,
    (designSystem: DesignSystem, _: UserConfig | null, rawCandidate: string) => {
      return designSystem.canonicalizeCandidates([rawCandidate]).pop() ?? rawCandidate
    },
  ]) {
    rawCandidate = migration(designSystem, userConfig, rawCandidate)
  }
  return rawCandidate
}

Subdomains

Frequently Asked Questions

What does migrate() do?
migrate() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-modernize-arbitrary-values.test.ts.
Where is migrate() defined?
migrate() is defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-modernize-arbitrary-values.test.ts at line 14.

Analyze Your Own Codebase

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

Try Supermodel Free