Gulp - Handle read-only permissions for dest files?

前端 未结 3 1560
半阙折子戏
半阙折子戏 2021-01-08 00:37

I have image files with read-only attribute set in source folder. I need to copy them to destination folder in most cases several times in gulpfile.js.

3条回答
  •  执笔经年
    2021-01-08 00:42

    rimraf can be used to avoid issues with TFS permissions (by deleting destination files before copying files)

    var rimraf = require("rimraf");
    gulp.task("images_clean", function (cb) {
        rimraf(imagesDest, cb);
    });
    

提交回复
热议问题