Skip to content

Commit 5713b31

Browse files
committed
re-add gulp file data feature
1 parent cdcaa0a commit 5713b31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function (headerText, data) {
2222
function TransformStream(file, enc, cb) {
2323
// format template
2424
var filename = path.basename(file.path);
25-
var template = data === false ? headerText : lodashTemplate(headerText)(Object.assign({ file: file, filename: filename }, data));
25+
var template = data === false ? headerText : lodashTemplate(headerText)(Object.assign({}, file.data || {}, { file: file, filename: filename }, data));
2626

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

0 commit comments

Comments
 (0)