Glob pattern to ignore certain .dot.js files

1.1k views Asked by At

I am looking for a glob pattern that excludes certain parts of the file name. For example, I want to get all *.js files but exclude all *.map.js files.

/hello/world.js // match
/hello/world.map.js // no match
/hello/world.test.js // match

I thought using a not pattern such as this /**/*!(.map).js would work but it still matches all three of the paths above.

I'm curious if this is possible without using an ignore pattern option. Thanks!

1

There are 1 answers