cordova-res
Advanced tools
Comparing version 0.15.0 to 0.15.1
@@ -263,3 +263,3 @@ "use strict"; | ||
]; | ||
async function copyImages(sourcePath, targetPath, images) { | ||
async function copyImages(sourcePath, targetPath, images, errstream) { | ||
await Promise.all(images.map(async (item) => { | ||
@@ -269,3 +269,9 @@ const source = path_1.default.join(sourcePath, item.source); | ||
debug('Copying generated resource from %O to %O', source, target); | ||
await utils_fs_1.copy(source, target); | ||
try { | ||
await utils_fs_1.copy(source, target); | ||
} | ||
catch (e) { | ||
debug(e); | ||
errstream === null || errstream === void 0 ? void 0 : errstream.write(`WARN:\tError occurred while copying ${source}\n`); | ||
} | ||
})); | ||
@@ -279,6 +285,6 @@ return images.length; | ||
if (shouldCopyIcons) { | ||
count += await copyImages(SOURCE_IOS_ICON, path_1.default.join(iosProjectDirectory, IOS_APP_ICON_SET_PATH), IOS_ICONS); | ||
count += await copyImages(SOURCE_IOS_ICON, path_1.default.join(iosProjectDirectory, IOS_APP_ICON_SET_PATH), IOS_ICONS, errstream); | ||
} | ||
if (shouldCopySplash) { | ||
count += await copyImages(SOURCE_IOS_SPLASH, path_1.default.join(iosProjectDirectory, IOS_SPLASH_IMAGE_SET_PATH), IOS_SPLASHES); | ||
count += await copyImages(SOURCE_IOS_SPLASH, path_1.default.join(iosProjectDirectory, IOS_SPLASH_IMAGE_SET_PATH), IOS_SPLASHES, errstream); | ||
} | ||
@@ -289,6 +295,6 @@ } | ||
if (shouldCopyIcons) { | ||
count += await copyImages(SOURCE_ANDROID_ICON, path_1.default.join(androidProjectDirectory, ANDROID_RES_PATH), ANDROID_ICONS); | ||
count += await copyImages(SOURCE_ANDROID_ICON, path_1.default.join(androidProjectDirectory, ANDROID_RES_PATH), ANDROID_ICONS, errstream); | ||
} | ||
if (shouldCopySplash) { | ||
count += await copyImages(SOURCE_ANDROID_SPLASH, path_1.default.join(androidProjectDirectory, ANDROID_RES_PATH), ANDROID_SPLASHES); | ||
count += await copyImages(SOURCE_ANDROID_SPLASH, path_1.default.join(androidProjectDirectory, ANDROID_RES_PATH), ANDROID_SPLASHES, errstream); | ||
} | ||
@@ -295,0 +301,0 @@ } |
{ | ||
"name": "cordova-res", | ||
"version": "0.15.0", | ||
"version": "0.15.1", | ||
"description": "This tool will crop and resize PNG source images into appropriate sizes for modern iOS and Android devices.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://ionicframework.com", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147733
3698