Skip to content

Commit

Permalink
think I have the stream bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tracker1 committed May 7, 2016
1 parent c759d21 commit d01b6d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ module.exports = function (headerText, data) {
concat = new Concat(true, filename);

if (file.isBuffer()) {
concat.add(filename, new Buffer(template));
concat.add(null, new Buffer(template));
}

if (file.isStream()) {
var stream = through();
stream.write(new Buffer(template));
stream.on('error', this.emit.bind(this, 'error'));
file.contents = file.contents.pipe(stream);
this.push(file);
return cb();
}

// add sourcemap
Expand Down

0 comments on commit d01b6d8

Please sign in to comment.