New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-19295] iOS9: Titanium CLI automatically converts existing images to assets catalog #7231
Conversation
@@ -4002,6 +4003,7 @@ iOSBuilder.prototype.copyResources = function copyResources(next) { | |||
// fall through to default case | |||
|
|||
default: | |||
imageAssets[relPath] = info; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a good idea. Images are going to be copied into the app twice: once as they do now and again into the asset catalog.
You should add a 'jpg' and 'png' case above it and track imageAssets
separately. This case should be BEFORE 'html' as 'html' is designed to fall through.
No where are you deleting these images from |
// update image file's destination | ||
imageAssets[file].dest = path.join(imageSetAbsPath, imageName + '.' + imageExt); | ||
|
||
if (!(imageSetRelPath in imageSets)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally the in
operator is frowned down upon. You can generally say !imageSets[imageSetRelPath]
, but sometimes you need to do !imageSets.hasOwnProperty(imageSetRelPath)
.
d165b1a
to
51cee5e
Compare
name: imageSetName | ||
} | ||
|
||
fs.existsSync(imageSetAbsPath) || wrench.mkdirSyncRecursive(imageSetAbsPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is unnecessary.
80c9192
to
397a762
Compare
…es to assets catalog
CR'd and FR'd. Looks grrrrrrrreat! APPROVED |
[TIMOB-19295] iOS9: Titanium CLI automatically converts existing images to assets catalog
https://jira.appcelerator.org/browse/TIMOB-19295