Skip to content

Instantly share code, notes, and snippets.

@joelstransky
Created March 5, 2015 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelstransky/cbcf8dd57a34a3f27c5f to your computer and use it in GitHub Desktop.
Save joelstransky/cbcf8dd57a34a3f27c5f to your computer and use it in GitHub Desktop.
grunt-contrib-imagemin
'use strict';
// following guidelines from http://mattbailey.io/a-beginners-guide-to-grunt-redux/
module.exports = function(grunt) {
require('load-grunt-config')(grunt);
require('time-grunt')(grunt);
grunt.loadNpmTasks("grunt-contrib-imagemin");
/*grunt.loadNpmTasks("grunt-concurrent");*/
grunt.initConfig({
imagemin: {
all: {
files: [{
expand: true,
cwd: '../public_html/',
src: ['images2/**/*.{png,jpg,gif}'],
dest: '../imagemintest/'
}],
options:{
progressive: true
}
}
}
});
grunt.registerTask("img", ["imagemin"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment