Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
How to exclude only *.spec files and include all other *.js files under a directory in grunt task?

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!