pw-grunt-smushit
v0.4.0
Published
A Grunt task to remove unecessary bytes of PNG and JPG using Yahoo Smushit
Downloads
2
Readme
grunt-smushit
Grunt task to remove unecessary bytes of PNG and JPG, it uses node-smushit
Smush.it uses optimization techniques specific to image format to remove unnecessary bytes from image files. It is a "lossless" tool, which means it optimizes the images without changing their look or visual quality.
Getting Started
Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-smushit
Then add this line to your project's grunt.js
gruntfile:
grunt.loadNpmTasks('grunt-smushit');
Documentation
There are many ways to use grunt-smushit:
smushit:{
// with output folder (should not be inside source path)
destination:{
src:'tests/img',
dest:'tests/opt_img'
},
//with source images and output folder
destination1:{
src:['tests/img/logo.png','tests/img/whatever.png'],
dest:'tests/img/min'
},
// recursive extension filter with output folder
destination2: {
src: ['tests/img/**/*.png'],
dest:'tests/img/min'
},
//replace images
specific: {
src:['tests/img/logo.png','tests/img/tellme.jpg']
},
//replace by extension
specificExtension: {
src:['tests/img/**/*.png']
},
//replace recursive
path: {
src:'tests/img'
},
//replace single image
single: {
src:'tests/img/logo.png'
}
}
License
MIT License (c) Helder Santana
based on: grunt-recess