From 5346fdaa54843d31ff812f26a67d18b161a218a2 Mon Sep 17 00:00:00 2001 From: Eric Jinks Date: Wed, 6 Dec 2017 15:51:41 +1000 Subject: [PATCH] Prettier --- functions/resize-images.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/functions/resize-images.js b/functions/resize-images.js index 165c956..9f99d7f 100644 --- a/functions/resize-images.js +++ b/functions/resize-images.js @@ -33,10 +33,9 @@ const saveImages = ({ buffer, filename }) => { return Promise.all( options.sizes.map(async size => { const extname = path.extname(filename) - const newFilename = `${path.basename( - filename, + const newFilename = `${path.basename(filename, extname)}.${size}${ extname - )}.${size}${extname}` + }` const outputFile = `${options.outputDir}/${newFilename}` const fileExists = await doesFileExist({ filename: outputFile }) if (fileExists) return console.log(`↩️ ${outputFile} exists, skipping`)