Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prep for Oxide API changes
  • Loading branch information
thecrypticace committed Oct 25, 2024
commit 83e7cce6959b8df341dcc791a1ce5b0edca2ba81
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