Best way to filter files in gulp.watch?

后端 未结 1 1710
长情又很酷
长情又很酷 2020-12-23 13:20

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:



        
相关标签:
1条回答
  • 2020-12-23 13:48

    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"])
    […]
    
    0 讨论(0)
提交回复
热议问题