Reputation: 813
I need to include all *.js
files and exclude only *.spec.js
files under a directory.
I tried the following ways, it's either including all js or excluding all js files
'built/code/js/libs/preact/**/!(*.spec).js')
but it fails with the message syntax error near unexpected token `('.
If I do this way - 'built/code/js/libs/preact/**/!*.spec.js')
it excludes all js files
If I add in 2 different lines like below it excludes all js files
('built/code/js/libs/preact/**/*.js' +
'built/code/js/libs/preact/**/!*.spec.js')
Please let me know if there's a way to exclude spec files and include all other js files.
Upvotes: 1
Views: 671