All Projects → arthurbergmz → Webpack Pwa Manifest

arthurbergmz / Webpack Pwa Manifest

Licence: mit
Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects
es2015
71 projects
es5
17 projects

Projects that are alternatives of or similar to Webpack Pwa Manifest

Webapp Webpack Plugin
[DEPRECATED] use favicons-webpack-plugin instead
Stars: ✭ 127 (-71.59%)
Mutual labels:  webpack, manifest, plugin, pwa
Awesome Meta And Manifest
⚡ Awesome collection of meta tags & manifest properties.
Stars: ✭ 499 (+11.63%)
Mutual labels:  manifest, icons, pwa
Mailtolink
A quick and easy way to generate markup for mailto links without having to worry about the annoying formatting.
Stars: ✭ 478 (+6.94%)
Mutual labels:  webpack, generator, pwa
Offline Plugin
Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
Stars: ✭ 4,444 (+894.18%)
Mutual labels:  webpack, plugin, pwa
Base
Base is the foundation for creating modular, unit testable and highly pluggable, server-side node.js applications.
Stars: ✭ 67 (-85.01%)
Mutual labels:  application, plugin, app
Prestashop
Free PWA & SPA for PrestaShop
Stars: ✭ 59 (-86.8%)
Mutual labels:  webpack, app, pwa
Vue Pwa Asset Generator
PWA asset generator perfect with VueJS framework (but useful for all PWA!)
Stars: ✭ 97 (-78.3%)
Mutual labels:  manifest, icons, pwa
React Pwa Webpack Starter
Boilerplate to build a React PWA with Webpack + Workbox
Stars: ✭ 38 (-91.5%)
Mutual labels:  webpack, hot-reload, pwa
Gatsby Mail
A Gatsby email *application*
Stars: ✭ 450 (+0.67%)
Mutual labels:  application, app, pwa
Webpack Ops
📁 webpack bundle visualization // optimization // config tool
Stars: ✭ 251 (-43.85%)
Mutual labels:  application, webpack, plugin
React Webpack Boilerplate
Minimalistic ES6+ React boilerplate with Hot Reloading using Webpack 4 and Babel 7
Stars: ✭ 336 (-24.83%)
Mutual labels:  webpack, hot-reload
Vuefront
VueFront Core. Turn your old-fashioned CMS website in to a SPA & PWA in 5 minutes
Stars: ✭ 316 (-29.31%)
Mutual labels:  app, pwa
Super Progressive Web Apps
SuperPWA helps to convert your WordPress website into Progressive Web Apps instantly. PWA (Progressive Web Apps) demo at : https://superpwa.com and Plugin :
Stars: ✭ 304 (-31.99%)
Mutual labels:  plugin, pwa
App Info Parser
A javascript parser for parsing .ipa or .apk files. IPA/APK文件 js 解析器
Stars: ✭ 298 (-33.33%)
Mutual labels:  application, manifest
Pwa
An opinionated progressive web app boilerplate
Stars: ✭ 353 (-21.03%)
Mutual labels:  webpack, pwa
Vueniverse
Full stack, user based, PWA, Vue template.
Stars: ✭ 339 (-24.16%)
Mutual labels:  webpack, hot-reload
Keepass Yet Another Favicon Downloader
Yet Another Favicon Downloader for KeePass 2.x
Stars: ✭ 354 (-20.81%)
Mutual labels:  plugin, icons
Appify
Create a macOS Application from an executable (like a Go binary)
Stars: ✭ 372 (-16.78%)
Mutual labels:  application, app
Nineanimator
An elegant way of discovering anime on iOS.
Stars: ✭ 369 (-17.45%)
Mutual labels:  application, app
Ssr Sample
A minimum sample of Server-Side-Rendering, Single-Page-Application and Progressive Web App
Stars: ✭ 285 (-36.24%)
Mutual labels:  webpack, pwa

webpack-pwa-manifest

Looking for people willing to help! More info

webpack-pwa-manifest is a webpack plugin that generates a 'manifest.json' for your Progressive Web Application, with auto icon resizing and fingerprinting support.

If you are using inject on your configuration, ensure that HtmlWebpackPlugin appears before WebpackPwaManifest in the plugins array!

features

✔ Auto icon resizing

✔ Icon fingerprinting

✔ Manifest fingerprinting

✔ Auto manifest injection on HTML

✔ Hot Reload support

✔ ES6+ ready

install

npm install --save-dev webpack-pwa-manifest

usage

In your webpack.config.js:

// ES6+
import WebpackPwaManifest from 'webpack-pwa-manifest'

// ES5
var WebpackPwaManifest = require('webpack-pwa-manifest')

...

plugins: [
  new WebpackPwaManifest({
    name: 'My Progressive Web App',
    short_name: 'MyPWA',
    description: 'My awesome Progressive Web App!',
    background_color: '#ffffff',
    crossorigin: 'use-credentials', //can be null, use-credentials or anonymous
    icons: [
      {
        src: path.resolve('src/assets/icon.png'),
        sizes: [96, 128, 192, 256, 384, 512] // multiple sizes
      },
      {
        src: path.resolve('src/assets/large-icon.png'),
        size: '1024x1024' // you can also use the specifications pattern
      },
      {
        src: path.resolve('src/assets/maskable-icon.png'),
        size: '1024x1024',
        purpose: 'maskable'
      }
    ]
  })
]

output

manifest.<fingerprint>.json

{
  "name": "My Progressive Web App",
  "orientation": "portrait",
  "display": "standalone",
  "start_url": ".",
  "short_name": "MyPWA",
  "description": "My awesome Progressive Web App!",
  "background_color": "#ffffff",
  "icons": [
    {
      "src": "icon_1024x1024.<fingerprint>.png",
      "sizes": "1024x1024",
      "type": "image/png",
      "purpose": "maskable"
    },
    {
      "src": "icon_1024x1024.<fingerprint>.png",
      "sizes": "1024x1024",
      "type": "image/png"
    },
    {
      "src": "icon_512x512.<fingerprint>.png",
      "sizes": "512x512",
      "type": "image/png"
    },
    {
      "src": "icon_384x384.<fingerprint>.png",
      "sizes": "384x384",
      "type": "image/png"
    },
    {
      "src": "icon_256x256.<fingerprint>.png",
      "sizes": "256x256",
      "type": "image/png"
    },
    {
      "src": "icon_192x192.<fingerprint>.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "icon_128x128.<fingerprint>.png",
      "sizes": "128x128",
      "type": "image/png"
    },
    {
      "src": "icon_96x96.<fingerprint>.png",
      "sizes": "96x96",
      "type": "image/png"
    }
  ]
}

API

WebpackPwaManifest([options])

options

Type: object

You can follow the Web App Manifest specification.

The difference here is that, when defining icons, you can specify one icon with multiple sizes, using an array of integers, just as the example above.

You can also change the output's filename with the filename property.

Presets of options:

{
  filename: "manifest.json",
  name: "App",
  orientation: "portrait",
  display: "standalone",
  start_url: ".",
  crossorigin: null,
  inject: true,
  fingerprints: true,
  ios: false,
  publicPath: null,
  includeDirectory: true
}

By default, HTML injection and fingerprint generation are on. With inject: false and fingerprints: false, respectively, you can turn them off.

If inject: true and 'theme-color' property is not defined, it wil try to use theme_color as default. Otherwise, no theme-color meta tag will be injected.

With includeDirectory: true, we will use filename's directory to export the manifest file.

With orientation: 'omit', the orientation key will be omitted from the generated manifest file.

When inject: true and ios: true, specific Apple meta tags will be injected to the HTML code when possible, as requested at issue #13. You can see Apple's Configuring Web Application for more information. Instead of using a boolean value, you can also use an object to specify certain link or meta tag, for instance:

  ...
  ios: {
    'apple-mobile-web-app-title': 'AppTitle',
    'apple-mobile-web-app-status-bar-style': 'black'
  }

If publicPath option is not given, this plugin fallbacks to Webpack's public path definition.

When defining an icon object, you can also specify its output directory using a property called destination. Using ios: true in an icon object makes it eligible to the apple-touch-icon meta tag injection. Using ios: 'startup' in an icon object makes it eligible to the apple-touch-startup-image meta tag injection.

  ...
  icons: [
    {
      src: path.resolve('src/assets/icons/ios-icon.png'),
      sizes: [120, 152, 167, 180, 1024],
      destination: path.join('icons', 'ios'),
      ios: true
    },
    {
      src: path.resolve('src/assets/icons/ios-icon.png'),
      size: 1024,
      destination: path.join('icons', 'ios'),
      ios: 'startup'
    },
    {
      src: path.resolve('src/assets/icons/android-icon.png'),
      sizes: [36, 48, 72, 96, 144, 192, 512],
      destination: path.join('icons', 'android')
    }
  ]
}

If you specify a valid crossorigin property it will be added to the <link rel="manifest"> in the HTML document. This property determines if the request for the manifest includes CORS headers and is required if the manifest is located on a different domain or requires authentication.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].