randytarampi / pwa-asset-generator

Generate icons and splash screens for Progressive Web Applications
https://www.npmjs.com/package/@randy.tarampi/pwa-asset-generator
MIT License
0 stars 0 forks source link
android app assets cordova generator icon icons ios mobile node phonegap pwa resize-images resized-images resizer screen sharp splash splash-screen

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