Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slow to delete folders on windows #16

Open
michaeldewayneharris opened this issue Dec 2, 2014 · 1 comment
Open

slow to delete folders on windows #16

michaeldewayneharris opened this issue Dec 2, 2014 · 1 comment

Comments

@michaeldewayneharris
Copy link

running this batch file will delete them 1/4 of the time so its a problem with gulp-clean or its dependencies.

del /f/s/q folder > nul
rmdir /s/q folder
@michaeldewayneharris
Copy link
Author

here is some code that deletes folders fast using the above batch commands in a node friendly way. However, this should probably be added to clean on a lower level.

gulp.task('clean', function() {
 var exec = require("gulp-exec");
 return gulp.src(['.tmp', '.dist'], {
            read: false
        })
        .pipe(exec('del /f/s/q <%= file.path %> > nul'))
        .pipe(exec('rmdir /s/q <%= file.path %>'));
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant