Closed cameronrr closed 2 years ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit c909a20e74a29ca1a88411d2366ec23a80f53db1:
Sandbox | Source |
---|---|
basic | Configuration |
@cameronrr Thanks for pull request! It looks great!
Added ability to specify a separate 'maskable' icon.
This allows developers to create a combination of PWA icons suitable for their applications:
Tested locally using npm link and checked generated manifest.json using manifest-validator. Scenarios tested:
{ icon: 'static/icon.png' }
Expected: Manifest contains array of 'any' icons. Expected: dist/assets/static contains single set of icons. Result: As expected{ icon: 'static/icon.png', maskableIcon: false }
Expected: Manifest contains array of 'any' icons. Expected: dist/assets/static contains single set of icons. Result: As expected{ icon: 'static/icon.png', maskableIcon: true }
Expected: Manifest contains array of 'maskable any' icons. Expected: dist/assets/static contains single set of icons. Result: As expected{ icon: 'static/icon.png', maskableIcon: 'static/icon.png' }
Expected: Manifest contains array of 'maskable any' icons. Expected: dist/assets/static contains single set of icons. Result: As expected{ icon: 'static/icon.png', maskableIcon: 'static/icon-maskable.png' }
Expected: Manifest contains array of 'any' and 'maskable' icons. Expected: dist/assets/static contains two sets of icons (maskable, any). Result: As expected