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!
Here is what I've come up with:
**/!(*.map.js|!(*.js))
Here is the link to the playground: