0

I'm trying to delete all files except for my minified JavaScript files, all which have the .min suffix, and all .html files. This is what I have currently:

del([
   'build/app/**/*.!(html|min.js)'
]);

This ends up deleting all .js files, including the minified ones, but keeps the .html files. How can I modify this so it deletes all files except for the JavaScript files with the .min suffix and the .html files?

1 Answers1

0

Exclude the .html and .min.js files separately:

del([
 'build/app/**/*.*',
 '!build/app/**/*.html',
 '!build/app/**/*.min.js'
]);
Sven Schoenung
  • 30,224
  • 8
  • 65
  • 70