mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
fix(theme): remove cwd options from picomatch (#892)
This commit is contained in:
parent
6ebb1bda6e
commit
58ea2fc8cb
@ -46,12 +46,11 @@ export function resolveMatcherPattern(include?: string | string[], exclude?: str
|
||||
*
|
||||
* @param include - Patterns to include / 要包含的模式
|
||||
* @param exclude - Patterns to exclude / 要排除的模式
|
||||
* @param cwd - Current working directory for relative path matching / 用于相对路径匹配的当前工作目录
|
||||
* @returns Matcher function that tests file paths / 测试文件路径的匹配器函数
|
||||
*/
|
||||
export function createMatcher(include?: string | string[], exclude?: string | string[], cwd?: string): Matcher {
|
||||
export function createMatcher(include?: string | string[], exclude?: string | string[]): Matcher {
|
||||
exclude = ['**/node_modules/**', '**/.vuepress/**', ...toArray(exclude)]
|
||||
const { pattern, ignore } = resolveMatcherPattern(include, exclude)
|
||||
|
||||
return picomatch(pattern, { ignore, cwd })
|
||||
return picomatch(pattern, { ignore })
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user