diff --git a/lib/filter.js b/lib/filter.js index 5758700..1993a21 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -45,8 +45,8 @@ function logicCss (str, data) { if (nanomatch.some(path, exclude, { matchBase: true })) return str } - return new Promise(function (resolve, reject) { - new CleanCSS(options).minify(str, function (err, result) { + return new Promise((resolve, reject) => { + new CleanCSS(options).minify(str, (err, result) => { if (err) return reject(err) let saved = ((str.length - result.styles.length) / str.length * 100).toFixed(2) resolve(result.styles) @@ -107,7 +107,7 @@ function logicSvg () { assetPath.on('end', () => { if (assetTxt.length) { // Minify using svgo - new svgo(options).optimize(assetTxt).then(function (result) { + new svgo(options).optimize(assetTxt).then((result) => { // Replace the original file with the minified. route.set(path, result.data) // Logging