Grunt - delete all files and files in sub-directories with specific file extension

杀马特。学长 韩版系。学妹 提交于 2019-12-04 23:45:55
go-oleg

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.

Adam Simpson

Easy, knee-jerk, response is to use Exec + a one line shell script like this one:

find . -name "*.png" -type f|xargs rm -f

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!