Prettier
This commit is contained in:
parent
6deb77715b
commit
5346fdaa54
1 changed files with 2 additions and 3 deletions
|
|
@ -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`)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue