项目作者: alx741

项目描述 :
NativeScript Resources Generator
高级语言: Shell
项目地址: git://github.com/alx741/nsresgen.git
创建时间: 2017-04-28T20:03:15Z
项目社区:https://github.com/alx741/nsresgen

开源协议:

下载


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:

  1. $ 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:

  1. $ 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:

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

Dependencies

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