https://github.com/andria-dev/pwa-icon-gen
A CLI tool for generating PWA PNG icons of different sizes from an existing image.
https://github.com/andria-dev/pwa-icon-gen
Last synced: 2 months ago
JSON representation
A CLI tool for generating PWA PNG icons of different sizes from an existing image.
- Host: GitHub
- URL: https://github.com/andria-dev/pwa-icon-gen
- Owner: andria-dev
- License: mit
- Created: 2019-04-20T22:45:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T07:33:41.000Z (over 3 years ago)
- Last Synced: 2024-05-02T04:50:28.600Z (about 2 years ago)
- Language: JavaScript
- Homepage: https://npm.im/pwa-icon-gen
- Size: 257 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://npm.im/ink), [React](https://npm.im/react), and [Sharp](https://npm.im/sharp).
[A list of image types supported by Sharp can be found here](https://sharp.pixelplumbing.com/en/stable/#formats). And below:
- JPEG
- PNG
- WebP
- TIFF
- GIF
- SVG
# Usage
## Installation
To install `pwa-icon-gen` you can use `yarn` or `npm`.
```bash
yarn global add pwa-icon-gen
# or
npm install --global pwa-icon-gen
```
## Example
```bash
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 --out= [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)
```