Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Latest commit

 

History

History
39 lines (28 loc) · 1.27 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.27 KB

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