Skip to content

Commit 0bb92bc

Browse files
committed
perf: skip files by pattern
1 parent 1dac470 commit 0bb92bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cfg-resolve.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {cosmiconfigSync} from 'cosmiconfig';
33
import toCamelCase from 'to-camel-case';
44
import mergeOptions from 'merge-options';
55
import normalizePath from 'normalize-path';
6+
import fg from 'fast-glob';
67

78
export default ({input, flags = {}}) => {
89
const explorer = cosmiconfigSync('posthtml');
@@ -95,7 +96,7 @@ export default ({input, flags = {}}) => {
9596
output = normalizePath(output);
9697
}
9798

98-
skip = skip.map(file => normalizePath(path.join(path.resolve(root), file)));
99+
skip = fg.sync(skip, {cwd: path.resolve(root)}).map(file => normalizePath(path.join(path.resolve(root), file)));
99100

100101
return mergeOptions(config ?? {}, {
101102
input,

0 commit comments

Comments
 (0)