qleaner 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers/image.js +6 -4
- package/package.json +1 -1
package/controllers/image.js
CHANGED
|
@@ -146,16 +146,18 @@ async function getUnusedImages(chalk, imageDirectory, codeDirectory, options) {
|
|
|
146
146
|
let isFound = false;
|
|
147
147
|
while(!isFound && i < combinedImages.length) {
|
|
148
148
|
const imageFilePath = await resolver(path.resolve(combinedImages[i].file), combinedImages[i].value);
|
|
149
|
-
|
|
149
|
+
const filePath = path.resolve(file);
|
|
150
|
+
console.log(chalk.yellow(filePath), chalk.blue(imageFilePath));
|
|
151
|
+
if(compareFiles(filePath, imageFilePath)) {
|
|
150
152
|
isFound = true;
|
|
151
153
|
break;
|
|
152
154
|
}else if(i === combinedImages.length - 1) {
|
|
153
155
|
if(options.excludeFilePrint && options.excludeFilePrint.length > 0) {
|
|
154
|
-
if(!isExcludedFile(
|
|
155
|
-
unusedImages.push(
|
|
156
|
+
if(!isExcludedFile(filePath, options.excludeFilePrint)) {
|
|
157
|
+
unusedImages.push(filePath);
|
|
156
158
|
}
|
|
157
159
|
}else{
|
|
158
|
-
unusedImages.push(
|
|
160
|
+
unusedImages.push(filePath);
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
163
|
i++;
|