migrate() — tailwindcss Function Reference
Architecture documentation for the migrate() function in migrate-theme-to-var.test.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 74585675_6a09_6523_3821_3c9717327602["migrate()"] 503d103e_c7cf_7d9c_7027_bc94b8da09d3["migrate-theme-to-var.test.ts"] 74585675_6a09_6523_3821_3c9717327602 -->|defined in| 503d103e_c7cf_7d9c_7027_bc94b8da09d3 a9a5216f_0dd1_0c09_6894_e34986eaf2a5["migrateThemeToVar()"] 74585675_6a09_6523_3821_3c9717327602 -->|calls| a9a5216f_0dd1_0c09_6894_e34986eaf2a5 bbbe5224_64f9_042a_8b85_2e287c62c4d1["sortBuckets()"] 74585675_6a09_6523_3821_3c9717327602 -->|calls| bbbe5224_64f9_042a_8b85_2e287c62c4d1 9f6b611c_7303_0355_74f7_03283a44c6d0["formatNodes()"] 74585675_6a09_6523_3821_3c9717327602 -->|calls| 9f6b611c_7303_0355_74f7_03283a44c6d0 style 74585675_6a09_6523_3821_3c9717327602 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/codemods/css/migrate-theme-to-var.test.ts lines 11–24
async function migrate(input: string) {
return postcss()
.use(
migrateThemeToVar({
designSystem: await __unstable__loadDesignSystem(`@import 'tailwindcss';`, {
base: __dirname,
}),
}),
)
.use(sortBuckets())
.use(formatNodes())
.process(input, { from: expect.getState().testPath })
.then((result) => result.css)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does migrate() do?
migrate() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/css/migrate-theme-to-var.test.ts.
Where is migrate() defined?
migrate() is defined in packages/@tailwindcss-upgrade/src/codemods/css/migrate-theme-to-var.test.ts at line 11.
What does migrate() call?
migrate() calls 3 function(s): formatNodes, migrateThemeToVar, sortBuckets.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free