-
Notifications
You must be signed in to change notification settings - Fork 734
feat: Fix formatting issues, add image-size dependency and asset update script #3626
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
feat: Fix formatting issues, add image-size dependency and asset update script #3626
Conversation
…te script Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
@@ -0,0 +1,47 @@ | |||
export const icons = { |
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.
Is the separation for index.web file is because the web file contain dimensions?
package.json
Outdated
@@ -14,6 +14,7 @@ | |||
"url": "https://github.com/wix/react-native-ui-lib" | |||
}, | |||
"scripts": { | |||
"update-web-assets": "node scripts/assets/extract-dimensions.ts", |
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.
When do we need to run this script?
Yes, the separation for index.web files is specifically to include dimensions for web platform usage. When using the web platform, these files will be used instead of the regular index files, providing both the image URI and its dimensions in a single object. |
The 'update-web-assets' script should be run whenever new assets are added to the internal assets directories. Specifically, you would run this script after adding new PNG files to the src/assets/internal/icons or src/assets/internal/images directories to automatically generate the web-specific index files with dimensions for those assets. |
…/1742138254-web-index-getters-fix
…ke extract-dimensions script fully dynamic Co-Authored-By: [email protected] <[email protected]>
@adids1221 |
…imensions Co-Authored-By: [email protected] <[email protected]>
Co-Authored-By: [email protected] <[email protected]>
Description
This PR fixes formatting issues, adds image-size dependency to package.json, and adds an update-web-assets script for automatically generating web-specific index files with image dimensions.
Changelog
Assets - Fix formatting issues and add script for updating web assets
Additional Info
Related to PR #3618
Link to Devin run: https://app.devin.ai/sessions/3115fcb58d474cbeaadcaa51a8b24e15
Requested by: [email protected]