Skip to content

Instantly share code, notes, and snippets.

@alireza-ahmadi
Created September 25, 2014 12:04
Show Gist options
  • Save alireza-ahmadi/d3dd447567a8b0838497 to your computer and use it in GitHub Desktop.
Save alireza-ahmadi/d3dd447567a8b0838497 to your computer and use it in GitHub Desktop.
Batch compression of PNG files
var APIKEY = "OOOOOOOOOOOOOOOOOOOOOOOOOO";
module.exports = function(grunt){
grunt.loadNpmTasks('grunt-tinypng');
grunt.initConfig({
tinypng: {
options: {
apiKey: APIKEY,
showProgress: true,
stopOnImageError: false
},
compress: {
src: 'source/**/*.png',
dest: 'dest/',
expand : true
}
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment