Skip to content

Commit

Permalink
Merge pull request #49 from SimenB/patch-1
Browse files Browse the repository at this point in the history
Call resume on the stream to emit events
  • Loading branch information
lazd committed Jun 3, 2016
2 parents 1350804 + 352fe78 commit e96c934
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,12 @@ gulp.task('lint', function(cb) {

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

fs.writeFile('some/path/junit.xml', output, cb);
fs.writeFile('some/path/junit.xml', output, cb);
});
});
```
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ cssLintPlugin.reporter = function(customReporter, options) {

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

cssLintPlugin.addRule = function(rule) {
Expand Down

0 comments on commit e96c934

Please sign in to comment.