Skip to content

Commit

Permalink
fix: don't use ES2015 syntax (closes #171)
Browse files Browse the repository at this point in the history
  • Loading branch information
joakimbeng committed May 18, 2016
1 parent 195df4e commit 68add8a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: node_js
node_js:
- '0.12'
- '4'
- '5'
- '6'

sudo: false
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
"space": true,
"envs": [
"node"
]
],
"rules": {
"object-shorthand": [2, "never"]
}
}
}
24 changes: 12 additions & 12 deletions src/inject/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ function getNewContent(target, collection, opt) {
var tagsToInject = getTagsToInject(files, target, opt);

content = inject(content, {
startTag,
endTag,
tagsToInject,
startTag: startTag,
endTag: endTag,
tagsToInject: tagsToInject,
removeTags: opt.removeTags,
onMatch(match) {
onMatch: function (match) {
matches.push(match[0]);
}
});
Expand All @@ -140,11 +140,11 @@ function getNewContent(target, collection, opt) {
var endTag = getTagRegExp(opt.tags.end(targetExt, ext, opt.starttag), ext, opt);

content = inject(content, {
startTag,
endTag,
startTag: startTag,
endTag: endTag,
tagsToInject: [],
removeTags: opt.removeTags,
shouldAbort(match) {
shouldAbort: function (match) {
return matches.indexOf(match[0]) !== -1;
}
});
Expand Down Expand Up @@ -226,11 +226,11 @@ function prepareFiles(files, targetExt, opt) {
var endTag = getTagRegExp(opt.tags.end(targetExt, ext, opt.endtag), ext, opt);
var tagKey = String(startTag) + String(endTag);
return {
file,
ext,
startTag,
endTag,
tagKey
file: file,
ext: ext,
startTag: startTag,
endTag: endTag,
tagKey: tagKey
};
});
}
Expand Down

0 comments on commit 68add8a

Please sign in to comment.