且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Grunt - 删除具有特定文件扩展名的子目录中的所有文件和文件

更新时间:2022-11-28 18:54:54

You can configure the grunt-contrib-clean task to remove those files like this:

clean : {
    yourTarget : {
        src : [ "build/img/**/*.png~", 
                "build/img/**/*.gif~", 
                "build/img/**/*.jpg~"
        ]
    }
}

See this section of the docs for an explanation of **, *, and other globbing patterns.