arthurbergmz / webpack-pwa-manifest

Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
MIT License
513 stars 93 forks source link

Added support for non-square icon sizes #130

Open rtercias opened 4 years ago

rtercias commented 4 years ago

Adds support for non-square icon sizes (WxH) and fills in background with the image's top/left pixel. Ex.

{
  ios: 'startup',
  src: path.resolve('./tests/icon.png'),
  destination: 'icons',
  sizes: ['640x1136', '828x1792']
}

Also fixes broken tests:

  1. runTests was failing because it attempts to "read" the folder icons. Added a directory check to skip.
  2. tests were failing due to incorrect webpack hash in my local machine, so I updated some of the expected output files (seems like a known webpack issue) [https://github.com/webpack/webpack/issues/7179]
  3. fixed test-87, which was failing silently because there was no support for typeof size === 'string' on icons/index.js