Skip to content

isair/react-native-smart-assets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

react-native-smart-assets

Automatically generate an Images module from your image assets. Converts intelligently (e.g. PDF to @2x, @3x etc).

---Automatically-->

import Images from './Images';

...

<Image source={Images.myIcon} /> // Property name is same as file name. Automatically uses @2x, @3x.

Requirements

  • Mac OS X or Linux.
  • GhostScript is required to convert PDF assets into pre-rendered PNGs for different DPIs. Mac OS X users can use brew install gs.

Usage

./convert-assets.sh /assets_directory /output_directory

A directory named img and a script named Images.js will be added to the output directory. Existing ones will be removed.

About

✅ Automatically generate an Images module from your image assets. Converts intelligently (e.g. PDF to @2x, @3x etc).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages