Skip to content

Commit e96c934

Browse files
committed
Merge pull request #49 from SimenB/patch-1
Call resume on the stream to emit events
2 parents 1350804 + 352fe78 commit e96c934

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,12 @@ gulp.task('lint', function(cb) {
144144

145145
gulp.src('lib/*.css')
146146
.pipe(csslint())
147-
.pipe(csslint.reporter('junit-xml', {logger: function(str) { output += str; }}));
147+
.pipe(csslint.reporter('junit-xml', {logger: function(str) { output += str; }}))
148+
.on('end', function(err) {
149+
if (err) return cb(err);
148150

149-
fs.writeFile('some/path/junit.xml', output, cb);
151+
fs.writeFile('some/path/junit.xml', output, cb);
152+
});
150153
});
151154
```
152155

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ cssLintPlugin.reporter = function(customReporter, options) {
127127

128128
return cb();
129129
}
130-
);
130+
).resume(); // Force flow-mode https://nodejs.org/docs/latest/api/stream.html#stream_event_end
131131
};
132132

133133
cssLintPlugin.addRule = function(rule) {

0 commit comments

Comments
 (0)