Home:ALL Converter>Match minified JavaScript files and html files using globs

Match minified JavaScript files and html files using globs

Ask Time:2016-06-03T06:29:07         Author:user3186219

Json Formatter

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?

Author:user3186219,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/37603166/match-minified-javascript-files-and-html-files-using-globs
yy