1.0.3 • Published 3 years ago
to-webp v1.0.3
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);
});