Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

randytarampi/pwa-asset-generator

Repository files navigation

pwa-asset-generator

npm versions npm downloads npm license Build status Coverage status Maintainability status Analytics

Install @randy.tarampi/pwa-asset-generator

Use sharp to quickly generate image assets for a Progressive Web Application.

A single solution that wholly replaces @randy.tarampi/android-icon-resize, @randy.tarampi/android-splash-generate, @randy.tarampi/ios-icon-resize and @randy.tarampi/ios-splash-generate, or their old lwip relatives android-icon-resize, android-splash-generate, ios-icon-resize and ios-splash-generate.

Dependencies

brew install nvm
nvm install 8
npm install -g npm

Installation

npm install -g @randy.tarampi/pwa-asset-generator

Usage

# Generate icons and splash screens from a single file to the current working directory
pwa-asset-generator ./path/to/input/file

# Generate icons and splash screens from a single file to a specific directory
pwa-asset-generator ./path/to/input/file ./path/to/output/directory

# Generate splash screens from `./path/to/input/file` and icons from `./path/to/icon/file`
pwa-asset-generator ./path/to/input/file --icon ./path/to/icon/file

# Generate splash screens from `./path/to/splash/file` and icons from `./path/to/input/file`
pwa-asset-generator ./path/to/input/file --splash ./path/to/splash/file

# Generate icons and splash screens for a given format
pwa-asset-generator ./path/to/input/file --format webp

Testing

npm test