Automatic Android resource resizing for Cordova. Create an android-res
folder containing the images you want to resize
in the root folder of your Cordova project and use cordova-android-res to automatically resize and copy the images for
all current Android devices.
npm install -g cordova-android-res
- Create an
android-res
folder containing the images you want to resize in the root folder of your Cordova project - Run
cordova-android-res
.
-
npm install cordova-android-res --save-dev
-
Create
my-android-res-hook.js
var cordovaAndroidRes = require('cordova-android-res'); module.exports = function() { return cordovaAndroidRes(); };
-
Add hook to
config.xml
<hook src="my-android-res-hook.js" type="after_platform_add" />
That's it. Now every time you cordova add platform
, the Android resources will be auto generated.
- GraphicsMagick
- Android platform added to your project
MIT