webpconvert
v3.0.1
Published
CLI Converter from png/jpg images to webp
Downloads
282
Readme
WebpConvert
CLI Converter from png/jpg images to webp
Usage
- Install webpconvert
npm install -g webpconvert
- Run this command
webpconvert [source] [target] [options] # Example webpconvert webpconvert sample-images webpconvert sample-images -q 50 webpconvert sample-images output webpconvert sample-images -m webpconvert sample-images/KittenJPG.jpg
Help
webpconvert --help
Use npx for one time usage
npx webpconvert [source] [target] [options]
Options
| Option | Option alias | Description | Type | Default | |--------|--------------|-------------------------------------------------------------------------------------------------------|---------|---------| | -p | --prefix | Specify the prefix of output filename. | string | "" | | -s | --suffix | Specify the suffix of output filename. | string | "" | | -q | --quality | Specify the quality of webp image. Lower values yield better compression but the least image quality. | number | 80 | | -r | --recursive | Include files in sub-folders. Will be ignored if the [source] is a file. | boolean | | | -m | --mute | Disable output messages. | boolean | | | -h | --help | Show help. | boolean | | | -v | --version | Show version number. | boolean | |
Contributing
- Fork this repo
- Develop
- Create pull request
- Tag @rizqirizqi for review
- Merge~~
Start
yarn start [source] [target] [options]
Test
# Run test:
yarn test
# Update snapshot files:
yarn test -u
Lint
yarn lint
License
MIT