migrate-max-width-screen.ts — tailwindcss Source File
Architecture documentation for migrate-max-width-screen.ts, a typescript file in the tailwindcss codebase. 4 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR cc6b9529_7b9f_e67e_d645_39c9d1a98330["migrate-max-width-screen.ts"] da5d1116_ab2a_437a_6b13_c1429fd546fa["plugin-api.ts"] cc6b9529_7b9f_e67e_d645_39c9d1a98330 --> da5d1116_ab2a_437a_6b13_c1429fd546fa 0255ffc0_a3d5_e883_5143_99660766448f["Config"] cc6b9529_7b9f_e67e_d645_39c9d1a98330 --> 0255ffc0_a3d5_e883_5143_99660766448f bdedd2f6_da4b_69dc_e990_0814b59fbe6e["design-system.ts"] cc6b9529_7b9f_e67e_d645_39c9d1a98330 --> bdedd2f6_da4b_69dc_e990_0814b59fbe6e 665aa4ed_d86e_30e5_80d5_cd56b8ca8b62["DesignSystem"] cc6b9529_7b9f_e67e_d645_39c9d1a98330 --> 665aa4ed_d86e_30e5_80d5_cd56b8ca8b62 9e6a4eed_af26_fb7e_5549_7192b40e3cea["migrate-max-width-screen.test.ts"] 9e6a4eed_af26_fb7e_5549_7192b40e3cea --> cc6b9529_7b9f_e67e_d645_39c9d1a98330 e39bed3f_bfbf_a8c6_90a0_aa2ce3be1ef4["migrate.ts"] e39bed3f_bfbf_a8c6_90a0_aa2ce3be1ef4 --> cc6b9529_7b9f_e67e_d645_39c9d1a98330 style cc6b9529_7b9f_e67e_d645_39c9d1a98330 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Config } from '../../../../tailwindcss/src/compat/plugin-api'
import type { DesignSystem } from '../../../../tailwindcss/src/design-system'
export function migrateMaxWidthScreen(
designSystem: DesignSystem,
_userConfig: Config | null,
rawCandidate: string,
): string {
for (let candidate of designSystem.parseCandidate(rawCandidate)) {
if (
candidate.kind === 'functional' &&
candidate.root === 'max-w' &&
candidate.value?.value.startsWith('screen-')
) {
return designSystem.printCandidate({
...candidate,
value: {
...candidate.value,
value: `[theme(screens.${candidate.value.value.slice(7)})]`,
},
})
}
}
return rawCandidate
}
Domain
Subdomains
Functions
Dependencies
Imported By
Source
Frequently Asked Questions
What does migrate-max-width-screen.ts do?
migrate-max-width-screen.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the CommandLineInterface domain, Codemods subdomain.
What functions are defined in migrate-max-width-screen.ts?
migrate-max-width-screen.ts defines 1 function(s): migrateMaxWidthScreen.
What does migrate-max-width-screen.ts depend on?
migrate-max-width-screen.ts imports 4 module(s): Config, DesignSystem, design-system.ts, plugin-api.ts.
What files import migrate-max-width-screen.ts?
migrate-max-width-screen.ts is imported by 2 file(s): migrate-max-width-screen.test.ts, migrate.ts.
Where is migrate-max-width-screen.ts in the architecture?
migrate-max-width-screen.ts is located at packages/@tailwindcss-upgrade/src/codemods/template/migrate-max-width-screen.ts (domain: CommandLineInterface, subdomain: Codemods, directory: packages/@tailwindcss-upgrade/src/codemods/template).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free