to-webp
v1.0.3
Published
Convert png, jpg to webp if modification date is different.
Downloads
3
Maintainers
Readme
Convert png,jpg to webp if modification date is different.
$ npm install -g to-webp
$ to-webp --help
Usage: to-webp [options]
Convert png,jpg to webp if modification date is different.
Options:
-p, --pattern '<pattern>' glob path pattern
-h, --help display help for command
Example:
to-webp -p './src/assets/!(icons)/**/*.{png,jpeg,jpg}'
Use in your own program
import { toWebP } from "to-webp";
toWebP('./src/assets/!(icons)/**/*.{png,jpeg,jpg}')
.then(() => {
console.log("Success");
})
.catch(error => {
console.error(error);
});