Added grunt-imageoptim task
This commit is contained in:
10
Gruntfile.js
10
Gruntfile.js
@@ -49,6 +49,14 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
imageoptim: {
|
||||||
|
files: [
|
||||||
|
'assets/img'
|
||||||
|
],
|
||||||
|
options: {
|
||||||
|
quitAfter: true
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
less: {
|
less: {
|
||||||
files: [
|
files: [
|
||||||
@@ -79,12 +87,14 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks('grunt-recess');
|
grunt.loadNpmTasks('grunt-recess');
|
||||||
|
grunt.loadNpmTasks('grunt-imageoptim');
|
||||||
|
|
||||||
// Register tasks
|
// Register tasks
|
||||||
grunt.registerTask('default', [
|
grunt.registerTask('default', [
|
||||||
'clean',
|
'clean',
|
||||||
'recess',
|
'recess',
|
||||||
'uglify',
|
'uglify',
|
||||||
|
'imageoptim',
|
||||||
'version'
|
'version'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('dev', [
|
grunt.registerTask('dev', [
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"grunt-contrib-jshint": "~0.1.1",
|
"grunt-contrib-jshint": "~0.1.1",
|
||||||
"grunt-contrib-uglify": "~0.1.1",
|
"grunt-contrib-uglify": "~0.1.1",
|
||||||
"grunt-contrib-watch": "~0.2.0",
|
"grunt-contrib-watch": "~0.2.0",
|
||||||
"grunt-recess": "~0.3.0"
|
"grunt-recess": "~0.3.0",
|
||||||
|
"grunt-imageoptim": "~1.2.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user