【发布时间】:2022-12-02 04:10:33
【问题描述】:
I'm having trouble excluding test files from my glob expression as follows : I have this list of files
./app/tags.ts
./app/tag.ts
./app/status.ts
./app/bar/{foo}/baz.ts
./app/.hidden.ts
./app/_hidden.ts
./app/foo_dir/.hidden.ts
./app/some/testing_should_be_hidden.test.ts
I'm trying to exclude everything that starts with a '.' or starts with a '_' or includes a '.test' in the filename
so far this is what I tried :
Glob file pattern excluding node_modules
with my expression :
./**/[!._]*^(?!*test).{ts,js}
but It didn't work, however using:
./**/[!._]*.{ts,js}
excludes the 'hidden' files but not the test one
【问题讨论】:
标签: glob