3.0.3 • Published 5 years ago

grunt-cwebp v3.0.3

Weekly downloads
171
License
MIT
Repository
github
Last release
5 years ago

grunt-cwebp

Convert JPG and PNG images to WebP with grunt task.

Build Status NPM version Dependency Status devDependency Status

Install

$ npm install --save-dev grunt-cwebp

Usage

Please see following gruntfile.js example.

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

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

You can also pass the options like q: 50.

License

MIT © Shogo Sensui

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.1.1

8 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.7

10 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.0

11 years ago