Skip to content

alexpalchikovskiy/gulp-pwa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-pwa

Progressive Web Application manifest and all META tags with Gulp

Install

npm i gulp-pwa --save

Usage example

const gulp = require( 'gulp' );
const pwa = require( 'gulp-pwa' );

const options = {
  srcDir: 'images/pwa',
  name: 'My Application',
  theme_color: '#9cff03',
  background_color: '#9cff03'
}

gulp.task( 'build', () => {
  return gulp.src( 'html/**/*.html' ).pipe( pwa( options ) ).pipe(gulp.dest( 'dist' ));
} );

In dist directory will add manifest.json and in index.html will add all tags which need for PWA.

Options

srcDir - folder or URL where was your icons and splashscreen images.

name - application name

theme_color - statusbar color (only Android)

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

More options

Important

All icon names must be icon-${size}x${size}.png (as example icon-540x540.png)

All splashscreen names must be splashscreen-${width}x${height}.png (as example splashscreen-1242x2688.png)

Full list of icons and splashscreens

About

Progressive Web Application manifest and all META tags with Gulp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published