klei/gulp-inject

startTag Unexpected Token error with gulp

Closed this issue · 1 comments

Since the change from v3 to v4, I have seen what seems to be a code bug in the initialization of an object in inject:

...\node_modules\gulp-inject\src\inject\index.js:127
startTag,
^
SyntaxError: Unexpected token ,

Seems to be the inject statement below:

startAndEndTags.forEach(function (tagKey) {
    var files = filesPerTags[tagKey];
    var startTag = files[0].startTag;
    var endTag = files[0].endTag;
    var tagsToInject = getTagsToInject(files, target, opt);

    content = inject(content, {
      startTag,
      endTag,
      tagsToInject,
      removeTags: opt.removeTags,
      onMatch(match) {
        matches.push(match[0]);
      }
    });
  });

Duplicate of #171