I use del package to delete folder:
gulp.task(\'clean\', function(){ return del(\'dist/**/*\', {force:true}); });
But if there are many sub
According to the documentation : The glob pattern ** matches all children and the parent. You have to explicitly ignore the parent directories too
gulp.task('clean', function(){ return del(['dist/**', '!dist'], {force:true}); });
More info available here : del documentation