mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
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.
This commit is contained in:
parent
64497e380f
commit
b16444fc3a
@ -19,7 +19,7 @@ test(
|
||||
`,
|
||||
'src/index.html': html`
|
||||
<h1>🤠👋</h1>
|
||||
<div class="!flex sm:!block"></div>
|
||||
<div class="!flex sm:!block bg-gradient-to-t"></div>
|
||||
`,
|
||||
'src/input.css': css`
|
||||
@tailwind base;
|
||||
@ -35,7 +35,7 @@ test(
|
||||
'src/index.html',
|
||||
html`
|
||||
<h1>🤠👋</h1>
|
||||
<div class="flex! sm:block!"></div>
|
||||
<div class="flex! sm:block! bg-linear-to-t"></div>
|
||||
`,
|
||||
)
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ import path from 'node:path'
|
||||
import type { Candidate } from '../../../tailwindcss/src/candidate'
|
||||
import type { DesignSystem } from '../../../tailwindcss/src/design-system'
|
||||
import { extractCandidates, printCandidate, replaceCandidateInContent } from './candidates'
|
||||
import { bgGradient } from './codemods/bg-gradient'
|
||||
import { migrateImportant } from './codemods/migrate-important'
|
||||
|
||||
export type Migration = (candidate: Candidate) => Candidate | null
|
||||
@ -10,7 +11,7 @@ export type Migration = (candidate: Candidate) => Candidate | null
|
||||
export default async function migrateContents(
|
||||
designSystem: DesignSystem,
|
||||
contents: string,
|
||||
migrations: Migration[] = [migrateImportant],
|
||||
migrations: Migration[] = [migrateImportant, bgGradient],
|
||||
): Promise<string> {
|
||||
let candidates = await extractCandidates(designSystem, contents)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user