How can I use a glob to ignore files that start with an underscore?

前端 未结 4 1924
暖寄归人
暖寄归人 2020-12-16 12:35

I am using this file matching in gulp:

\'content/css/*.css\'

But I would like to only include the files that do not start

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-16 13:17

    You can add a second glob whitch will filter files or folders with an underscore.

    For ignore folders I use:

    gulp.src(['./src/**/*.html', '!**/_*/**'])
    

    '!**/_*/**' will filter folders that start with an underscore.

提交回复
热议问题