Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ function generate(dir, options) {

if (options.icon || options.i) {
logging.logger.info('Ionic icon resources generator');
promises.push(queueResTypeImages('icon'));
promises.push(queueResTypeImages('icon', options['ignore-cache'] || options.c));
} else if (options.splash || options.s) {
logging.logger.info('Ionic splash screen resources generator');
promises.push(queueResTypeImages('splash'));
promises.push(queueResTypeImages('splash', options['ignore-cache'] || options.c));
} else {
logging.logger.info('Ionic icon and splash screen resources generator');
promises.push(queueResTypeImages('icon'));
promises.push(queueResTypeImages('splash'));
promises.push(queueResTypeImages('icon', options['ignore-cache'] || options.c));
promises.push(queueResTypeImages('splash', options['ignore-cache'] || options.c));
}

return Q.all(promises)
Expand All @@ -242,7 +242,7 @@ function generate(dir, options) {
});
}

function queueResTypeImages(resType) {
function queueResTypeImages(resType, ignoreCache) {
var resTypePlatforms = {};

return buildImagesData()
Expand Down Expand Up @@ -387,7 +387,7 @@ function queueResTypeImages(resType) {
}
}

if (Settings.cacheImages && fs.existsSync(image.tmpPath)) {
if (!ignoreCache && Settings.cacheImages && fs.existsSync(image.tmpPath)) {
logging.logger.info(image.resType + ' ' + image.platform + ' ' + image.name + ' (' + image.width + 'x' + image.height + ') from cache');

} else {
Expand Down