Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.