Skip to content

Instantly share code, notes, and snippets.

@shirokuro331
Created March 5, 2013 13:57
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 shirokuro331/5090476 to your computer and use it in GitHub Desktop.
Save shirokuro331/5090476 to your computer and use it in GitHub Desktop.
grunt-contrib-imagemin メモ https://github.com/gruntjs/grunt-contrib-imagemin
module.exports = function(grunt) {
grunt.initConfig({
imagemin: { // Task
dist: { // Target
options: { // Target options
optimizationLevel: 3
},
files: { // Dictionary of files
'dist/': 'src/*.png' // dist is output directory name. src directory png file are optimization
}
}
}
});
// gruntタスクライブラリを読み込み
grunt.loadNpmTasks('grunt-contrib-imagemin');
// デフォルトで実行するタスク
grunt.registerTask('default', 'imagemin');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment