Skip to content

Commit

Permalink
re-add gulp file data feature
Browse files Browse the repository at this point in the history
  • Loading branch information
tracker1 committed Mar 8, 2018
1 parent cdcaa0a commit 5713b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (headerText, data) {
function TransformStream(file, enc, cb) {
// format template
var filename = path.basename(file.path);
var template = data === false ? headerText : lodashTemplate(headerText)(Object.assign({ file: file, filename: filename }, data));
var template = data === false ? headerText : lodashTemplate(headerText)(Object.assign({}, file.data || {}, { file: file, filename: filename }, data));

if (file && typeof file === 'string') {
this.push(template + file);
Expand Down

0 comments on commit 5713b31

Please sign in to comment.