pwa-config

1.0.1 • Public • Published

pwa-config

The most actual config for progressive web application. All meta tags and manifest. Useful list of icons and splash screens.

Also try Gulp solution

Install

npm i pwa-config --save

How to use?

const Config = require( 'pwa-config' );
 
let options = {
  srcDir: 'images/pwa',
  name: 'My Application',
  theme_color: '#9cff03'
}
 
const _config = new Config( options );
 
console.log( _config.tags ); // String
console.log( _config.manifest ); // Object
 
console.log( _config.icons ); // Array of objects
console.log( _config.splashscreens ); // Array of objects

Options

srcDir - directory or url to icons and splashscreens images

name - name of your web application

theme_color - statusbar color (only Android)

background_color - background color when launching app (only Android, because iOS use splashscreen image)

start_url - home page of your app, by default /?utm_source=standalone&utm_medium=pwa, utm_source and utm_medium using for tracking by analytics services

orientation - can be any natural, landscape, landscape-primary, landscape-secondary, portrait, portrait-primary, portrait-secondary, by default any

display - by default standalone, more about display

All Web App Manifest options

Icons

You need only 3 icons for all devices:

icon-540x540.png - all iOS devices

icon-192x192.png - part of Android devices

icon-512x512.png - another part of Android devices:)

Splashscreens

You need splashscreens only for iOS devices, because Android using background_color option and icon for display splashscreen.

splashscreen-1242x2688.png - for iPhone 11 Pro Max, Xs Max

splashscreen-828x1792.png - for iPhone 11, Xr

splashscreen-1125x2436.png - for iPhone 11 Pro, Xs, X

splashscreen-1242x2208.png - for iPhone 8 Plus, 7 Plus, 6s Plus, 6 Plus

splashscreen-750x1334.png - for iPhone 8, 7, 6s, 6

splashscreen-640x1136.png - for iPhone SE, 5s, 5

splashscreen-1620x2160.png - for iPad

splashscreen-2048x2732.png - for iPad Pro 12.9

splashscreen-1668x2388.png - for iPad Pro 11

splashscreen-1668x2224.png - for iPad Pro 10.5

splashscreen-1536x2048.png - for iPad Mini, Air

Package Sidebar

Install

npm i pwa-config

Weekly Downloads

9

Version

1.0.1

License

ISC

Unpacked Size

7.88 kB

Total Files

7

Last publish

Collaborators

  • alexpalchikovskiy