Skip to content

Commit b16444f

Browse files
Add the bg-gradient migration to the default list of template migrations (#14538)
Quick follow-up from #14537 as I forgot to add the new migration to the default list of migrations.
1 parent 64497e3 commit b16444f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

integrations/upgrade/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test(
1919
`,
2020
'src/index.html': html`
2121
<h1>🤠👋</h1>
22-
<div class="!flex sm:!block"></div>
22+
<div class="!flex sm:!block bg-gradient-to-t"></div>
2323
`,
2424
'src/input.css': css`
2525
@tailwind base;
@@ -35,7 +35,7 @@ test(
3535
'src/index.html',
3636
html`
3737
<h1>🤠👋</h1>
38-
<div class="flex! sm:block!"></div>
38+
<div class="flex! sm:block! bg-linear-to-t"></div>
3939
`,
4040
)
4141

packages/@tailwindcss-upgrade/src/template/migrate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import path from 'node:path'
33
import type { Candidate } from '../../../tailwindcss/src/candidate'
44
import type { DesignSystem } from '../../../tailwindcss/src/design-system'
55
import { extractCandidates, printCandidate, replaceCandidateInContent } from './candidates'
6+
import { bgGradient } from './codemods/bg-gradient'
67
import { migrateImportant } from './codemods/migrate-important'
78

89
export type Migration = (candidate: Candidate) => Candidate | null
910

1011
export default async function migrateContents(
1112
designSystem: DesignSystem,
1213
contents: string,
13-
migrations: Migration[] = [migrateImportant],
14+
migrations: Migration[] = [migrateImportant, bgGradient],
1415
): Promise<string> {
1516
let candidates = await extractCandidates(designSystem, contents)
1617

0 commit comments

Comments
 (0)