Dev tools: Add `grunt imagemin:core` task for optimizing images pre-commit.

Adds grunt-contrib-imagemin, so an `npm install` will be required.

props jorbin, wonderboymusic for initial patches.
see #25169.


git-svn-id: https://develop.svn.wordpress.org/trunk@27172 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-02-13 08:00:47 +00:00
parent 110978e2d3
commit 877982732a
2 changed files with 13 additions and 1 deletions

View File

@ -303,7 +303,7 @@ module.exports = function(grunt) {
}
},
jsvalidate:{
options:{
options: {
globals: {},
esprimaOptions:{},
verbose: false
@ -317,6 +317,17 @@ module.exports = function(grunt) {
}
}
},
imagemin: {
core: {
expand: true,
cwd: SOURCE_DIR,
src: [
'wp-{admin,includes}/images/**/*.{png,jpg,gif,jpeg}',
'wp-includes/js/tinymce/skins/wordpress/images/*.{png,jpg,gif,jpeg}'
],
dest: SOURCE_DIR
}
},
watch: {
all: {
files: [

View File

@ -22,6 +22,7 @@
"grunt-cssjanus": "~0.2.2",
"grunt-sass": "~0.10.0",
"grunt-jsvalidate": "~0.2.2",
"grunt-contrib-imagemin" : "~0.4.1",
"matchdep": "~0.3.0"
}
}