{"repo":"svbutko/react-native-image-resource-generator","free":true,"listed":false,"github":"https://github.com/svbutko/react-native-image-resource-generator","clone":"git clone https://github.com/svbutko/react-native-image-resource-generator.git","description":"CLI tool to generate code-friendly image URI source constants for React Native","language":"JavaScript","stars":23,"topics":["react-native","images","icons","resources","productivity","typescript","javascript","generator","hacktoberfest"],"license":"MIT","category":"mobile-apps","readme_excerpt":"react-native-image-resource-generator Generate code-friendly image URI source constants. To learn about use cases and what issues it solves check this blog post. Quick start Installation yarn npm Usage 1. Create a folder and put all of your images there ( sub-folders are supported too ). Example: 2. Add script to your package.json scripts or type into terminal: JavaScript: TypeScript 3. The result of the previous command will create a file with static image URI sources, which will look something similar to this: 4. After this use it anywhere you need: If you added or removed images, simply re-run the script to regenerate the file. Options Option Description Required Example -------- ---------------------------------------------------------------------------- ---------- ---------------------------------------------------- dir Relative directory path with images True img-res-gen --dir=resources/images out Output file path True img-res-gen --out=src/common/ImageResources.g.ts read Read directory path, adds additional path to a file's output required path False img-res-gen --read=build/src ts Should the output file be generated as a TypeScript file False img-res-gen --ts","default_branch":null,"files":null,"tree":[],"storefront":"/r/svbutko","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/svbutko/react-native-image-resource-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}