Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies and tests #64

Merged
merged 4 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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