'use strict';
module.exports = function(gulp, plugins, config, name, file) { // eslint-disable-line func-names
  const dest            = [],
        production      = plugins.util.env.prod || false,
        theme           = config.themes[name],
        srcBase         = config.projectPath + theme.dest;

  let emailFilename   = 'email-inline.css';

  if (production) {
    emailFilename = 'email-inline.min.css';
  }

  return gulp.src(file || srcBase + '/**/*/' + emailFilename)
    .pipe(plugins.if(
      !plugins.util.env.ci,
      plugins.plumber({
        errorHandler: plugins.notify.onError('Error: <%= error.message %>')
      })
    ))
    .pipe(plugins.logger({
      display   : 'rel',
      beforeEach: 'Email styles from: ',
      afterEach : ' has been fixed!'
    }))
    .pipe(plugins.replace('@charset "UTF-8";', ''))
    .pipe(plugins.multiDest(dest))
};


@@ -64,14 +64,8 @@
 name
-, file
 ) %7B 
@@ -110,38 +110,8 @@
 nst 
-dest            = %5B%5D,%0A        
 prod
@@ -117,21 +117,16 @@
 duction 
-     
 = plugin
@@ -153,34 +153,23 @@
 alse
-,
 %0A  
-     
+const
  theme 
-          
 = co
@@ -189,17 +189,16 @@
 ame%5D
-,
 %0A  
-     
+const
  src
@@ -202,24 +202,16 @@
 srcBase 
-        
 = config
@@ -239,15 +239,15 @@
 dest
-;%0A
 %0A  
-le
+cons
 t em
@@ -262,72 +262,47 @@
 ame 
-  
 = 
-'email-inline.css';%0A%0A  if (production) %7B%0A    emailFilename =
+production ? 'email-inline.min.css' :
  'em
@@ -316,21 +316,12 @@
 ine.
-min.css';%0A  %7D
+css'
 %0A%0A  
@@ -340,16 +340,8 @@
 src(
-file %7C%7C 
 srcB
@@ -742,30 +742,22 @@
 ipe(
-plugins.multiDest(dest
+gulp.dest('./'
 ))%0A%7D

Update email-fix.js