Skip to content

Commit d1f7e4e

Browse files
committed
chore: Show warning in case old image definition is not found in android.
1 parent c5d3db4 commit d1f7e4e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/services/project-data-service.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -456,15 +456,24 @@ export class ProjectDataService implements IProjectDataService {
456456

457457
const normalizedPaths = _.map(realPaths, (p) => path.normalize(p));
458458
_.each(assetItems, (assetItem) => {
459+
const imagePath = path.join(assetItem.directory, assetItem.filename);
460+
461+
let found = false;
459462
_.each(normalizedPaths, (currentNormalizedPath) => {
460-
const imagePath = path.join(assetItem.directory, assetItem.filename);
461463
if (currentNormalizedPath.indexOf(path.normalize(imagePath)) !== -1) {
462464
assetItem.path = currentNormalizedPath;
463465
assetItem.size = `${assetItem.width}${AssetConstants.sizeDelimiter}${assetItem.height}`;
464466
assetSubGroup.images.push(assetItem);
467+
found = true;
465468
return false;
466469
}
467470
});
471+
472+
if (!found) {
473+
this.$logger.warn(
474+
`Didn't find a matching old image definition for file ${imagePath}. This file will be skipped from resources generation.`
475+
);
476+
}
468477
});
469478

470479
return assetSubGroup;

0 commit comments

Comments
 (0)