Skip to content

A CLI tool for generating PWA PNG icons of different sizes from an existing image.

License

Notifications You must be signed in to change notification settings

andria-dev/pwa-icon-gen

Repository files navigation

pwa-icon-gen

A CLI tool for generating Progressive Web App icons of different sizes in PNG format from an existing image. Built using Ink, React, and Sharp.

A list of image types supported by Sharp can be found here. And below:

  • JPEG
  • PNG
  • WebP
  • TIFF
  • GIF
  • SVG

Usage

Installation

To install pwa-icon-gen you can use yarn or npm.

yarn global add pwa-icon-gen

# or

npm install --global pwa-icon-gen

Example

pwa-icon-gen logo.svg --out=public/icons/

# custom sizes
pwa-icon-gen logo.svg --out=public/icons/ --sizes=50,100,150,200

All CLI Options

Usage: pwa-icon-gen <icon-path> --out=<out-dir> [options]
       pwa-icon-gen logo.svg --out=public/icons/
       pwa-icon-gen logo.png --out=public/ --sizes=72,144,512

Options:
	--out	Destination directory for the icons.
	--sizes	The different sizes to be generated.
		Format: comma separated list (i.e. 128,256,512)

About

A CLI tool for generating PWA PNG icons of different sizes from an existing image.

Resources

License

Stars

Watchers

Forks

Packages

No packages published