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:
parent
110978e2d3
commit
877982732a
13
Gruntfile.js
13
Gruntfile.js
@ -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: [
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user