Skip to content

Commit d600964

Browse files
committed
update all instances of new Scanner(…)
This now makes use of just `sources` instead of auto content detection.
1 parent f3fe3ce commit d600964

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/@tailwindcss-upgrade/src/migrate-js-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function keyframesToCss(keyframes: Record<string, unknown>): string {
285285
}
286286

287287
function autodetectedSourceFiles(base: string) {
288-
let scanner = new Scanner({ detectSources: { base } })
288+
let scanner = new Scanner({ sources: [{ base, pattern: '**/*' }] })
289289
scanner.scan()
290290
return scanner.files
291291
}

packages/tailwindcss/src/candidate.bench.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Theme } from './theme'
88
const root = process.env.FOLDER || process.cwd()
99

1010
// Auto content detection
11-
const scanner = new Scanner({ detectSources: { base: root } })
11+
const scanner = new Scanner({ sources: [{ base: root, pattern: '**/*' }] })
1212

1313
const candidates = scanner.scan()
1414
const designSystem = buildDesignSystem(new Theme())

packages/tailwindcss/src/index.bench.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const root = process.env.FOLDER || process.cwd()
77
const css = String.raw
88

99
bench('compile', async () => {
10-
let scanner = new Scanner({ detectSources: { base: root } })
10+
let scanner = new Scanner({ sources: [{ base: root, pattern: '**/*' }] })
1111
let candidates = scanner.scan()
1212

1313
let { build } = await compile(css`

0 commit comments

Comments
 (0)