1
1
'use strict' ;
2
- var gutil = require ( 'gulp-util ' ) ;
2
+ var pluginError = require ( 'plugin-error ' ) ;
3
3
var through = require ( 'through2' ) ;
4
4
var iconv = require ( 'iconv-lite' ) ;
5
5
@@ -10,7 +10,7 @@ module.exports = function (options) {
10
10
options = options || { } ;
11
11
12
12
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' ) ;
14
14
}
15
15
16
16
options . from = options . from || UTF8 ;
@@ -33,7 +33,7 @@ module.exports = function (options) {
33
33
. pipe ( iconv . encodeStream ( options . to , options . iconv . encode ) ) ;
34
34
this . push ( file ) ;
35
35
} catch ( err ) {
36
- this . emit ( 'error' , new gutil . PluginError ( 'gulp-convert-encoding' , err ) ) ;
36
+ this . emit ( 'error' , new pluginError ( 'gulp-convert-encoding' , err ) ) ;
37
37
}
38
38
}
39
39
@@ -43,7 +43,7 @@ module.exports = function (options) {
43
43
file . contents = iconv . encode ( content , options . to , options . iconv . encode ) ;
44
44
this . push ( file ) ;
45
45
} catch ( err ) {
46
- this . emit ( 'error' , new gutil . PluginError ( 'gulp-convert-encoding' , err ) ) ;
46
+ this . emit ( 'error' , new pluginError ( 'gulp-convert-encoding' , err ) ) ;
47
47
}
48
48
}
49
49
0 commit comments