Skip to content

Commit 05300e6

Browse files
authored
Merge pull request #5 from Bargamut/master
Replace gulp-util to plugin-error and some upgrade
2 parents 90ae4cb + 07b3ea2 commit 05300e6

File tree

5 files changed

+1726
-24
lines changed

5 files changed

+1726
-24
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
22
node_js:
3-
- '0.10'
3+
- '10'
44
after_script:
55
- npm run coveralls

Diff for: index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
var gutil = require('gulp-util');
2+
var pluginError = require('plugin-error');
33
var through = require('through2');
44
var iconv = require('iconv-lite');
55

@@ -10,7 +10,7 @@ module.exports = function (options) {
1010
options = options || {};
1111

1212
if (!options.from && !options.to) {
13-
throw new gutil.PluginError('gulp-convert-encoding', 'At least one of `from` or `to` required');
13+
throw new pluginError('gulp-convert-encoding', 'At least one of `from` or `to` required');
1414
}
1515

1616
options.from = options.from || UTF8;
@@ -33,7 +33,7 @@ module.exports = function (options) {
3333
.pipe(iconv.encodeStream(options.to, options.iconv.encode));
3434
this.push(file);
3535
} catch (err) {
36-
this.emit('error', new gutil.PluginError('gulp-convert-encoding', err));
36+
this.emit('error', new pluginError('gulp-convert-encoding', err));
3737
}
3838
}
3939

@@ -43,7 +43,7 @@ module.exports = function (options) {
4343
file.contents = iconv.encode(content, options.to, options.iconv.encode);
4444
this.push(file);
4545
} catch (err) {
46-
this.emit('error', new gutil.PluginError('gulp-convert-encoding', err));
46+
this.emit('error', new pluginError('gulp-convert-encoding', err));
4747
}
4848
}
4949

0 commit comments

Comments
 (0)