How can I fix ./src/js/**/!(*.spec.js|*.test.js)
, so it doesn't return directories? I've tried it like this ./src/js/**/*.!(spec.js|test.js)
, but it matches all files except the directories, the same as ./src/js/**/*
. Example output of ./src/js/**/!(*.spec.js|*.test.js)
:
[ './src/js/__tests__',
'./src/js/__tests__/example.js',
'./src/js/example.js',
'./src/js/index.js' ]
Desired output:
[ './src/js/__tests__/example.js',
'./src/js/example.js',
'./src/js/index.js' ]
glob version 7.1.3