1.1.5 • Published 8 years ago

cordova-icon-gm v1.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

cordova-icon-gm

Automatic icon resizing for Cordova. Add icon.png to the root folder of your Cordova project and use cordova-icon-gm to automatically resize, copy and configure the icon for all current Android and iOS devices.

Manual usage

  1. npm install -g cordova-icon-gm
  2. Place icon.png to the root folder of your Cordova project
  3. Run cordova-icon.

Automated usage

  1. npm install cordova-icon-gm --save-dev

  2. Create my-icon-hook.js

    var icon = require('cordova-icon-gm');
    
    module.exports = function() {
      return icon.generate();
    };
  3. Add hook to config.xml

    <hook src="my-icon-hook.js" type="after_platform_add" />

That's it. Now every time you cordova add platform, the icons will be auto generated.

Requirements

  • GraphicsMagick
  • At least one platform was added to your project
  • Cordova's config.xml file must exist in the root folder

Credits

All credit goes to Alex Disler for his cordova-icon module, from which this project is forked from. The node imagemagick module is deprecated in favor of gm.

License

MIT