/webpconvert

CLI Converter from png/jpg images to webp

Primary LanguageJavaScriptMIT LicenseMIT

WebpConvert

CLI Converter from png/jpg images to webp

Build Status version downloads MIT License

contributions welcome Watch on GitHub Star on GitHub Tweet

Usage

  1. Install webpconvert
    npm install -g webpconvert
  2. 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

  1. Fork this repo
  2. Develop
  3. Create pull request
  4. Tag @rizqirizqi for review
  5. Merge~~

Start

yarn start [source] [target] [options]

Test

# Run test:
yarn test
# Update snapshot files:
yarn test -u

Lint

yarn lint

License

MIT