files.forEach(function(file) { file = file.replace(/\\/g, '/'); var relPathToSass = path.relative(path.resolve(opts.project, opts.sass), file); pathsToCss.push(path.resolve(opts.project, opts.css, gutil.replaceExtension(relPathToSass, '.css'))); filePaths.push(file); });
through.obj(function (file, enc, callback) { if (file.isStream()) { this.emit('error', new PluginError(NAME, 'Streams are not supported!')) return callback() } if (file.isBuffer()) { var output = file.clone(); output.contents = new Buffer(mjmlEngine.mjml2html(file.contents.toString())); output.path = gutil.replaceExtension(file.path.toString(), '.html'); this.push(output); } return callback(); })