Skip to content

1000ch/grunt-dwebp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-dwebp GitHub Actions Status

Convert WebP images to PNG with grunt task.

Install

$ npm install --save-dev grunt-dwebp

Usage

Please see following gruntfile.js example.

module.exports = function (grunt) {
  grunt.initConfig({
    dwebp: {
      static: {
        files: { 
          'dist/img.png': 'src/img.webp'
        }
      },
      dynamic: {
        files: [{
          expand: true,
          cwd: 'src/', 
          src: ['**/*.{png,jpg,gif}'],
          dest: 'dist/'
        }]
      }
    }
  });

  grunt.loadNpmTasks('grunt-dwebp');
};

License

MIT © Shogo Sensui