0.19.0 • Published 2 months ago
@hidoo/gulp-plugin-webp v0.19.0
@hidoo/gulp-plugin-webp
Plugin that generate webp for gulp.
Installation
$ npm install --save-dev gulp@next @hidoo/gulp-plugin-webp
Usage
import { src, dest, task } from 'gulp';
import webp from '@hidoo/gulp-plugin-webp';
task('webp', () =>
src('/path/to/src').pipe(webp()).pipe(dest('/path/to/dest'))
);
API
webp
return webp.
Parameters
options
Object option (optional, default{}
)
Examples
import { src, dest, task } from 'gulp';
import webp from '@hidoo/gulp-plugin-webp';
task('webp', () =>
src('/path/to/src')
.pipe(
webp({
// this plugin options
append: false,
keepExtname: false,
verbose: true,
// specify imagemin-webp options
quality: 100
})
)
.pipe(dest('/path/to/dest'))
);
Returns DestroyableTransform
Test
$ pnpm test
License
MIT
1.0.0-alpha.1
2 months ago
1.0.0-alpha.0
3 months ago
0.19.0
3 years ago
0.18.0
3 years ago
0.17.0
3 years ago