Skip to content

Commit

Permalink
Prep for Oxide API changes (#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace authored Oct 29, 2024
1 parent 901cdf0 commit bba9b29
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/tailwindcss-language-server/src/oxide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,21 @@ export async function scan(options: ScanOptions): Promise<ScanResult | null> {
}

// V3
if (lte(options.oxideVersion, '4.0.0-alpha.30')) {
let scanner = new oxide.Scanner({
detectSources: { base: options.basePath },
sources: options.sources,
})

return {
files: scanner.files,
globs: scanner.globs,
}
}

// V4
let scanner = new oxide.Scanner({
detectSources: { base: options.basePath },
sources: options.sources,
sources: [{ base: options.basePath, pattern: '**/*' }, ...options.sources],
})

return {
Expand Down

0 comments on commit bba9b29

Please sign in to comment.