I would like to watch all, but the .min.ext files in my directories with gulp.js. What is the best way to filter out those?
Example:
gulp.task('watch', function(e) { gulp.watch('./js/*.js', ['css']); // don't want to watch .min.js files. what is best way? });
EDIT: If can't be done without external packages, which one is the most reputable?
gulp.watch
internally uses vinyl-fs
(see source), which uses gaze
, which uses itself minimatch
, so you should be able to ignore some files using !./js/*.min.*
.
In fact, this is even described in vinyl-fs's README:
fs.src(["./js/**/*.js", "!./js/vendor/*.js"]) […]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With