Skip to content

alx741/nsresgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

NativeScript Resources Generator

Helper script to generate NativeScript image resources for both Android and iOS from an image.

Executing the script with an image path as parameter, it will generate all the necessary image sizes and automatically populate the app/App_Resouces directory tree.

Usage

Install the script:

$ sudo cp nsresgen.sh /usr/local/bin/nsresgen

And invoke it while inside the root directory of a NativeScript project, passing an image as parameter:

$ nsresgen /home/user/cats/image.png

The app/App_Resources directory will be correctly populated, so you're now able to use the resource from your code as usual:

<Image src="res://image"></Image>

Dependencies

The nsresgen script depends upon the imagemagick package, so be sure to have it in your system.

About

NativeScript Resources Generator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages