From 59b0d5beb709eb8a405918f5b71f76a54f42ed36 Mon Sep 17 00:00:00 2001 From: Aslan Baryshnikov Date: Tue, 26 Apr 2022 01:45:35 +0300 Subject: [PATCH] ignoreDestinationFiles renamed to ignoreConflicts --- README.md | 2 +- index.js | 6 +++--- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c2d770d..62837ae 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Default `false` If true, only existing files in the destination folder will be overwritten. If your destination folder is empty, there will be no changes (because nothing to update). Only available when smartMode is enabled. -##### ignoreDestinationFiles? +##### ignoreConflicts? Type: `Boolean`
Default `false` diff --git a/index.js b/index.js index 0edc3d2..c4b0ffe 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ const imageOptimist = async (config) => { destinationPath: null, smartMode: true, overwriteMode: false, - ignoreDestinationFiles: false, + ignoreConflicts: false, mask: '*.{jpg,jpeg,png,svg,gif}', webp: [ imageminWebp({ @@ -120,7 +120,7 @@ const imageOptimist = async (config) => { !candidateIsExists || !sourceFileIsExists || candidateSize === sourceFileSize - || c.ignoreDestinationFiles + || c.ignoreConflicts ) { // eslint-disable-next-line no-nested-ternary if (candidateIsExists ? tmpFileSize < candidateSize : true) { @@ -134,7 +134,7 @@ const imageOptimist = async (config) => { console.warn(`Conflict: ${sourceFile} and ${candidate}\nThe source file and the file in the` + ' destination folder are not the same. You should replace an' + ' obsolete file with a more recent one to avoid erroneous overwriting.' - + ' You can set ignoreDestinationFiles to true if you do not care about' + + ' You can set ignoreConflicts to true if you do not care about' + ' files in the destination folder.'); } } else { diff --git a/package.json b/package.json index 98a0120..7d2897c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "image-optimist", - "version": "1.0.14", + "version": "1.0.15", "description": "A utility for processing and converting images to the requirements of the modern web.", "private": false, "main": "index.js",