File tree 1 file changed +14
-12
lines changed
packages/vite-plugin-checker/src
1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,20 @@ export function createIgnore(_root: string, pattern: string | string[] = []) {
6
6
const paths = Array . isArray ( pattern ) ? pattern : [ pattern ]
7
7
const root = _root . replace ( / \\ / g, '/' )
8
8
9
- const globs = paths . flatMap ( ( f ) => {
10
- const resolvedPath = resolve ( root , f )
11
- const relativePath = relative ( root , resolvedPath ) . replace ( / \\ / g, '/' )
12
- try {
13
- const isDirectory =
14
- ! relativePath . includes ( '*' ) && statSync ( resolvedPath ) . isDirectory ( )
15
- if ( isDirectory ) {
16
- return [ relativePath , join ( relativePath , '**/*' ) . replace ( / \\ / g, '/' ) ]
17
- }
18
- } catch { }
19
- return [ relativePath ]
20
- } )
9
+ const globs = paths
10
+ . flatMap ( ( f ) => {
11
+ const resolvedPath = resolve ( root , f )
12
+ const relativePath = relative ( root , resolvedPath ) . replace ( / \\ / g, '/' )
13
+ try {
14
+ const isDirectory =
15
+ ! relativePath . includes ( '*' ) && statSync ( resolvedPath ) . isDirectory ( )
16
+ if ( isDirectory ) {
17
+ return [ relativePath , join ( relativePath , '**/*' ) . replace ( / \\ / g, '/' ) ]
18
+ }
19
+ } catch { }
20
+ return [ relativePath ]
21
+ } )
22
+ . filter ( Boolean )
21
23
22
24
const matcher = picomatch ( globs , { cwd : root } )
23
25
You can’t perform that action at this time.
0 commit comments