1
- import * as os from 'node:os'
2
1
import * as path from 'node:path'
3
2
import * as fs from 'node:fs/promises'
4
- import glob from 'fast-glob'
5
3
import picomatch from 'picomatch'
6
4
import type { Settings } from '@tailwindcss/language-service/src/util/state'
7
5
import { CONFIG_GLOB , CSS_GLOB } from './lib/constants'
@@ -17,6 +15,7 @@ import { normalizeDriveLetter, normalizePath, pathToFileURL } from './utils'
17
15
import postcss from 'postcss'
18
16
import * as oxide from './oxide'
19
17
import { analyzeStylesheet , TailwindStylesheet } from './version-guesser'
18
+ import { searchFiles } from './glob'
20
19
21
20
export interface ProjectConfig {
22
21
/** The folder that contains the project */
@@ -276,14 +275,10 @@ export class ProjectLocator {
276
275
277
276
private async findConfigs ( ) : Promise < ConfigEntry [ ] > {
278
277
// Look for config files and CSS files
279
- let files = await glob ( [ `**/${ CONFIG_GLOB } ` , `**/${ CSS_GLOB } ` ] , {
280
- cwd : this . base ,
281
- ignore : this . settings . tailwindCSS . files . exclude ,
282
- onlyFiles : true ,
283
- absolute : true ,
284
- suppressErrors : true ,
285
- dot : true ,
286
- concurrency : Math . max ( os . cpus ( ) . length , 1 ) ,
278
+ let files = await searchFiles ( {
279
+ root : this . base ,
280
+ include : [ `**/${ CONFIG_GLOB } ` , `**/${ CSS_GLOB } ` ] ,
281
+ exclude : this . settings . tailwindCSS . files . exclude ,
287
282
} )
288
283
289
284
let realpaths = await Promise . all ( files . map ( ( file ) => fs . realpath ( file ) ) )
0 commit comments