11'use strict' ;
2- var gutil = require ( 'gulp-util ' ) ;
2+ var pluginError = require ( 'plugin-error ' ) ;
33var through = require ( 'through2' ) ;
44var 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