cordova-icon-gm
v1.1.5
Published
Automatic icon resizing for Cordova
Downloads
8
Maintainers
Readme
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
npm install -g cordova-icon-gm
- Place
icon.png
to the root folder of your Cordova project - Run
cordova-icon
.
Automated usage
npm install cordova-icon-gm --save-dev
Create
my-icon-hook.js
var icon = require('cordova-icon-gm'); module.exports = function() { return icon.generate(); };
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