Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda