Skip to content

Commit c539822

Browse files
committed
better error handling
1 parent bcadf33 commit c539822

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

index.js

+13-9
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,19 @@ function gulpJadeInheritance(options) {
6060
filesPaths = _.union(filesPaths, fullpaths);
6161
});
6262

63-
vfs.src(filesPaths, {'base': options.basedir})
64-
.pipe(es.through(
65-
function (f) {
66-
stream.emit('data', f);
67-
},
68-
function () {
69-
stream.emit('end');
70-
}
71-
));
63+
if(filesPaths.length) {
64+
vfs.src(filesPaths, {'base': options.basedir})
65+
.pipe(es.through(
66+
function (f) {
67+
stream.emit('data', f);
68+
},
69+
function () {
70+
stream.emit('end');
71+
}
72+
));
73+
} else {
74+
stream.emit('end');
75+
}
7276
} else {
7377
stream.emit('end');
7478
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gulp-jade-inheritance",
3-
"version": "0.5.4",
3+
"version": "0.5.5",
44
"description": "Rebuild only changed jade files and all it dependencies",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)