How to ignore test files with glob?

2

My project is structured like this:

dist
  - *
node_modules
  - *
source
  - *.js
  - *.spec.js
  - *.test.js
  - *.vue
  - __tests__
tests
  - *.js
  - *.spec.js
  - *.test.js

I'm trying to create a glob to just get the files vue and js , but I'm not sure how to remove files spec.js and test.js from the source directory.

My current glob is like this: project/!(node_modules|dist|__tests__|tests)**/*.+(!(spec|test)|vue|js)

It takes everything inside the source folder with the exception of the __tests__ folder. Now I wanted to know how I can get it to just get js and not spec.js and test.js .

    
asked by anonymous 21.06.2018 / 16:31

0 answers