Skip to content

Commit

Permalink
Merge pull request #64 from backflip/feature/travis
Browse files Browse the repository at this point in the history
Update dependencies and tests
  • Loading branch information
backflip authored Jan 3, 2019
2 parents 98fbc78 + d0e9882 commit d71d872
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 4,544 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
node_modules
test/results*
npm-debug.log
npm-debug.log
package-lock.json
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: node_js
node_js:
- 0.10
- 6
- 8
- 10

script:
- npm test
9 changes: 2 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function iconfontCSS(config) {
base: file.base,
cwd: file.cwd,
path: path.join(file.base, config.targetPath),
contents: file.isBuffer() ? new Buffer(0) : new Stream.PassThrough()
contents: file.isBuffer() ? Buffer.alloc(0) : new Stream.PassThrough()
});
}

Expand Down Expand Up @@ -127,12 +127,7 @@ function iconfontCSS(config) {
throw new PluginError(PLUGIN_NAME, 'Error in template: ' + err.message);
}

// TODO: remove condition and the else block for version 3.0
if( Buffer.from ){
content = Buffer.from(html);
}else{
content = Buffer(html);
}
content = Buffer.from(html);

if (outputFile.isBuffer()) {
outputFile.contents = content;
Expand Down
Loading

0 comments on commit d71d872

Please sign in to comment.