Skip to content

Commit 6ac20b6

Browse files
author
Null McNull
committed
gulp don't copy empty folders
1 parent b1d172a commit 6ac20b6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gulp-tasks/module-tasks/copy-task.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
var path = require('path');
3+
var filter = require('../lib/gulp-mini-filter.js');
34

45
module.exports = function(gulp, module) {
56

@@ -16,6 +17,10 @@ module.exports = function(gulp, module) {
1617
});
1718

1819
return gulp.src(glob)
20+
.pipe(filter(function(file) {
21+
// Only copy files -- don't copy empty directories
22+
return file.stat.isFile();
23+
}))
1924
.pipe(gulp.dest(module.folders.dest));
2025

2126
});

0 commit comments

Comments
 (0)