Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
resize icon grunt task for mobile-chrom-apps
// for https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/NextSteps.md
module.exports = function(grunt) {
grunt.initConfig({
image_resize: {
options: { overwrite: true, upscale: true, crop: true },
icon_16: {
options: { width: 16, height: 16 },
files: { 'www/assets/icon16.png':'www/assets/icon.png' }
},
icon_36: {
options: { width: 36, height: 36 },
files: { 'www/assets/icon36.png':'www/assets/icon.png' }
},
icon_48: {
options: { width: 48, height: 48 },
files: { 'www/assets/icon48.png':'www/assets/icon.png' }
},
icon_57: {
options: { width: 57, height: 57 },
files: { 'www/assets/icon57.png':'www/assets/icon.png' }
},
icon_72: {
options: { width: 72, height: 72 },
files: { 'www/assets/icon72.png':'www/assets/icon.png' }
},
icon_78: {
options: { width: 78, height: 78 },
files: { 'www/assets/icon78.png':'www/assets/icon.png' }
},
icon_96: {
options: { width: 96, height: 96 },
files: { 'www/assets/icon96.png':'www/assets/icon.png' }
},
icon_114: {
options: { width: 114, height: 114 },
files: { 'www/assets/icon114.png':'www/assets/icon.png' }
},
icon_120: {
options: { width: 120, height: 120 },
files: { 'www/assets/icon120.png':'www/assets/icon.png' }
},
icon_128: {
options: { width: 128, height: 128 },
files: { 'www/assets/icon128.png':'www/assets/icon.png' }
},
icon_144: {
options: { width: 144, height: 144 },
files: { 'www/assets/icon144.png':'www/assets/icon.png' }
},
icon_152: {
options: { width: 152, height: 152 },
files: { 'www/assets/icon152.png':'www/assets/icon.png' }
}
}
});
grunt.loadNpmTasks('grunt-image-resize');
grunt.registerTask('default', ['image_resize']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.