File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,13 +4,15 @@ const pathExists = require('path-exists');
44const pify = require ( 'pify' ) ;
55const gm = require ( 'gm' ) ;
66const mkdir = require ( 'mkdirp' ) ;
7+ const pwaIcons = require ( 'pwa-icon-list' ) ;
78const androidIcons = require ( 'android-icon-list' ) ;
89const bb10Icons = require ( 'bb10-icon-list' ) ;
910const iosIcons = require ( 'ios-icon-list' ) ;
1011
1112const mkdirp = pify ( mkdir ) ;
1213
1314const platformIcons = {
15+ pwa : pwaIcons ( ) ,
1416 android : androidIcons ( ) ,
1517 ios : iosIcons ( ) ,
1618 blackberry10 : bb10Icons ( )
Original file line number Diff line number Diff line change 3737 "ios-icon-list" : " ^1.0.0" ,
3838 "mkdirp" : " ^0.5.1" ,
3939 "path-exists" : " ^3.0.0" ,
40- "pify" : " ^2.3.0"
40+ "pify" : " ^2.3.0" ,
41+ "pwa-icon-list" : " ^1.0.0"
4142 },
4243 "devDependencies" : {
4344 "ava" : " *" ,
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ Source file of the icon.
6565
6666* Required* <br >
6767Type: ` string ` <br >
68- Values: ` android ` ` ios ` ` blackberry10 `
68+ Values: ` pwa ` ` android ` ` ios ` ` blackberry10 `
6969
7070Platform to generate the icons for.
7171
@@ -93,7 +93,18 @@ Directory to save the generated icons.
9393
9494## Platforms
9595
96- The supported platforms are ` Android ` , ` iOS ` and ` BlackBerry 10 ` . Every platform generates a different set of icons.
96+ The supported platforms are ` PWA ` , ` Android ` , ` iOS ` and ` BlackBerry 10 ` . Every platform generates a different set of icons.
97+
98+ ### PWA
99+
100+ - ` icon-72x72.png `
101+ - ` icon-96x96.png `
102+ - ` icon-128x128.png `
103+ - ` icon-144x144.png `
104+ - ` icon-152x152.png `
105+ - ` icon-192x192.png `
106+ - ` icon-384x384.png `
107+ - ` icon-512x512.png `
97108
98109### Android
99110
Original file line number Diff line number Diff line change @@ -10,6 +10,19 @@ test.beforeEach(t => {
1010 t . context . tmp = tempfile ( ) ;
1111} ) ;
1212
13+ test ( 'pwa' , async t => {
14+ await fn ( 'fixtures/icon.png' , { platform : 'pwa' , dest : t . context . tmp } ) ;
15+
16+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-72x72.png' ) ) ) ;
17+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-96x96.png' ) ) ) ;
18+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-128x128.png' ) ) ) ;
19+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-144x144.png' ) ) ) ;
20+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-152x152.png' ) ) ) ;
21+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-192x192.png' ) ) ) ;
22+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-384x384.png' ) ) ) ;
23+ t . true ( pathExists . sync ( path . join ( t . context . tmp , 'icon-512x512.png' ) ) ) ;
24+ } ) ;
25+
1326test ( 'android' , async t => {
1427 await fn ( 'fixtures/icon.png' , { platform : 'android' , dest : t . context . tmp } ) ;
1528
You can’t perform that action at this time.
0 commit comments