Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.22 KB

README.md

File metadata and controls

68 lines (44 loc) · 1.22 KB

/!\ Alpha code will break a lot in the coming week

motion-assets

motion-assets allows RubyMotion projects to use ImageMagick to generate all the icons and splash screens sizes.

Installation

You need to have ImageMagick installed:

$ brew install imagemagick

And the gem installed:

$ [sudo] gem install motion-assets

Or if you use Bundler:

gem 'motion-assets'

Setup

In the Rakefile, set paths for your base images :

Motion::Project::App.setup do |app|
  # ...
  app.assets.source_icon = "./src_images/icon-1024x1024.png"
  app.assets.source_splash = "./src_images/splash-2028x2028.png"
  
  # optional
  app.assets.output_dir = "./some/directory"
end

Configuration

Motion::Project::App.setup do |app|
  # Add or remove icons
  app.assets.icons << 'CustomSize.png|32x32'
  app.assets.icons.delete('[email protected]|120x120')

  # Disable optimization
  app.assets.optimize = false
end

Note : motion-assets will autopopulate your app.icons array with the list of created icons.

Tasks

To tell motion-assets to generate the assets :

$ [bundle exec] rake assets:generate

note : the sample icon comes from the great Pixelmator tool, http://www.pixelmator.com/