I understood the answer:
To remove the readonly attribute of all files in a directory recursively, we run the following command in Windows Command Prompt
attrib -r <dir-name>\*.* /s
The next gulp task removes the readonly attribute of all files in
gulp.task('remove-readonly-attributes', function() {
require("child_process").exec("attrib -r <dir-name>\*.* /s");
});
source
share