diff --git a/src/__snapshots__/main.test.ts.snap b/src/__snapshots__/main.test.ts.snap index b3105a56..92f6a071 100644 --- a/src/__snapshots__/main.test.ts.snap +++ b/src/__snapshots__/main.test.ts.snap @@ -32,10 +32,7 @@ Object { ", "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", }, "manifestJsonContent": Array [ @@ -265,34 +262,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -318,10 +291,7 @@ Object { "htmlMeta": Object { "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", }, "manifestJsonContent": Array [ @@ -343,34 +313,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -1150,12 +1096,9 @@ Object { "htmlMeta": Object { "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", - "favicon": " + "favicon": " ", }, "manifestJsonContent": Array [ @@ -1177,34 +1120,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -1225,7 +1144,7 @@ Object { "height": 196, "name": "favicon-196", "orientation": null, - "path": "temp/favicon-196.jpg", + "path": "temp/favicon-196.png", "scaleFactor": 1, "width": 196, }, @@ -1265,12 +1184,9 @@ Object { ", "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", - "favicon": " + "favicon": " ", }, "manifestJsonContent": Array [ @@ -1500,34 +1416,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -1548,7 +1440,7 @@ Object { "height": 196, "name": "favicon-196", "orientation": null, - "path": "temp/favicon-196.jpg", + "path": "temp/favicon-196.png", "scaleFactor": 1, "width": 196, }, @@ -1588,10 +1480,7 @@ Object { ", "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", }, "manifestJsonContent": Array [ @@ -1821,34 +1710,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -1874,12 +1739,9 @@ Object { "htmlMeta": Object { "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", - "favicon": " + "favicon": " ", }, "manifestJsonContent": Array [ @@ -1901,34 +1763,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -1949,7 +1787,7 @@ Object { "height": 196, "name": "favicon-196", "orientation": null, - "path": "temp/favicon-196.jpg", + "path": "temp/favicon-196.png", "scaleFactor": 1, "width": 196, }, @@ -1962,10 +1800,7 @@ Object { "htmlMeta": Object { "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", }, "manifestJsonContent": Array [ @@ -1987,34 +1822,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -2314,12 +2125,9 @@ Object { ", "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", - "favicon": " + "favicon": " ", }, "manifestJsonContent": Array [ @@ -2549,34 +2357,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -2597,7 +2381,7 @@ Object { "height": 196, "name": "favicon-196", "orientation": null, - "path": "temp/favicon-196.jpg", + "path": "temp/favicon-196.png", "scaleFactor": 1, "width": 196, }, @@ -2610,10 +2394,7 @@ Object { "htmlMeta": Object { "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", }, "manifestJsonContent": Array [ @@ -2635,34 +2416,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", @@ -2688,10 +2445,7 @@ Object { "htmlMeta": Object { "appleMobileWebAppCapable": " ", - "appleTouchIcon": " - - - + "appleTouchIcon": " ", }, "manifestJsonContent": Array [ @@ -2713,34 +2467,10 @@ Object { "height": 180, "name": "apple-icon-180", "orientation": null, - "path": "temp/apple-icon-180.jpg", + "path": "temp/apple-icon-180.png", "scaleFactor": 1, "width": 180, }, - Object { - "height": 167, - "name": "apple-icon-167", - "orientation": null, - "path": "temp/apple-icon-167.jpg", - "scaleFactor": 1, - "width": 167, - }, - Object { - "height": 152, - "name": "apple-icon-152", - "orientation": null, - "path": "temp/apple-icon-152.jpg", - "scaleFactor": 1, - "width": 152, - }, - Object { - "height": 120, - "name": "apple-icon-120", - "orientation": null, - "path": "temp/apple-icon-120.jpg", - "scaleFactor": 1, - "width": 120, - }, Object { "height": 192, "name": "manifest-icon-192", diff --git a/src/__snapshots__/visual/input-html-dark/apple-icon-120.jpg b/src/__snapshots__/visual/input-html-dark/apple-icon-120.jpg deleted file mode 100644 index 99eab6f2..00000000 Binary files a/src/__snapshots__/visual/input-html-dark/apple-icon-120.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html-dark/apple-icon-152.jpg b/src/__snapshots__/visual/input-html-dark/apple-icon-152.jpg deleted file mode 100644 index ee58ebe2..00000000 Binary files a/src/__snapshots__/visual/input-html-dark/apple-icon-152.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html-dark/apple-icon-167.jpg b/src/__snapshots__/visual/input-html-dark/apple-icon-167.jpg deleted file mode 100644 index 144c23f2..00000000 Binary files a/src/__snapshots__/visual/input-html-dark/apple-icon-167.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html-dark/apple-icon-180.jpg b/src/__snapshots__/visual/input-html-dark/apple-icon-180.jpg deleted file mode 100644 index 621a42c1..00000000 Binary files a/src/__snapshots__/visual/input-html-dark/apple-icon-180.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html-dark/apple-icon-180.png b/src/__snapshots__/visual/input-html-dark/apple-icon-180.png new file mode 100644 index 00000000..3da86643 Binary files /dev/null and b/src/__snapshots__/visual/input-html-dark/apple-icon-180.png differ diff --git a/src/__snapshots__/visual/input-html/apple-icon-120.jpg b/src/__snapshots__/visual/input-html/apple-icon-120.jpg deleted file mode 100644 index 326a964f..00000000 Binary files a/src/__snapshots__/visual/input-html/apple-icon-120.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html/apple-icon-152.jpg b/src/__snapshots__/visual/input-html/apple-icon-152.jpg deleted file mode 100644 index d4c3588a..00000000 Binary files a/src/__snapshots__/visual/input-html/apple-icon-152.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html/apple-icon-167.jpg b/src/__snapshots__/visual/input-html/apple-icon-167.jpg deleted file mode 100644 index aeb40146..00000000 Binary files a/src/__snapshots__/visual/input-html/apple-icon-167.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html/apple-icon-180.jpg b/src/__snapshots__/visual/input-html/apple-icon-180.jpg deleted file mode 100644 index 2cfdbd89..00000000 Binary files a/src/__snapshots__/visual/input-html/apple-icon-180.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-html/apple-icon-180.png b/src/__snapshots__/visual/input-html/apple-icon-180.png new file mode 100644 index 00000000..876432e9 Binary files /dev/null and b/src/__snapshots__/visual/input-html/apple-icon-180.png differ diff --git a/src/__snapshots__/visual/input-png/apple-icon-120.jpg b/src/__snapshots__/visual/input-png/apple-icon-120.jpg deleted file mode 100644 index c822f098..00000000 Binary files a/src/__snapshots__/visual/input-png/apple-icon-120.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-png/apple-icon-152.jpg b/src/__snapshots__/visual/input-png/apple-icon-152.jpg deleted file mode 100644 index b02c0843..00000000 Binary files a/src/__snapshots__/visual/input-png/apple-icon-152.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-png/apple-icon-167.jpg b/src/__snapshots__/visual/input-png/apple-icon-167.jpg deleted file mode 100644 index f2d48940..00000000 Binary files a/src/__snapshots__/visual/input-png/apple-icon-167.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-png/apple-icon-180.jpg b/src/__snapshots__/visual/input-png/apple-icon-180.jpg deleted file mode 100644 index a51ac61c..00000000 Binary files a/src/__snapshots__/visual/input-png/apple-icon-180.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-png/apple-icon-180.png b/src/__snapshots__/visual/input-png/apple-icon-180.png new file mode 100644 index 00000000..980788db Binary files /dev/null and b/src/__snapshots__/visual/input-png/apple-icon-180.png differ diff --git a/src/__snapshots__/visual/input-svg/apple-icon-120.jpg b/src/__snapshots__/visual/input-svg/apple-icon-120.jpg deleted file mode 100644 index efb41fd1..00000000 Binary files a/src/__snapshots__/visual/input-svg/apple-icon-120.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-svg/apple-icon-152.jpg b/src/__snapshots__/visual/input-svg/apple-icon-152.jpg deleted file mode 100644 index fdda1cd1..00000000 Binary files a/src/__snapshots__/visual/input-svg/apple-icon-152.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-svg/apple-icon-167.jpg b/src/__snapshots__/visual/input-svg/apple-icon-167.jpg deleted file mode 100644 index fe7dcb3a..00000000 Binary files a/src/__snapshots__/visual/input-svg/apple-icon-167.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-svg/apple-icon-180.jpg b/src/__snapshots__/visual/input-svg/apple-icon-180.jpg deleted file mode 100644 index 243ba63d..00000000 Binary files a/src/__snapshots__/visual/input-svg/apple-icon-180.jpg and /dev/null differ diff --git a/src/__snapshots__/visual/input-svg/apple-icon-180.png b/src/__snapshots__/visual/input-svg/apple-icon-180.png new file mode 100644 index 00000000..656371bd Binary files /dev/null and b/src/__snapshots__/visual/input-svg/apple-icon-180.png differ diff --git a/src/__snapshots__/visual/output-png/apple-icon-120.png b/src/__snapshots__/visual/output-png/apple-icon-120.png deleted file mode 100644 index 62700476..00000000 Binary files a/src/__snapshots__/visual/output-png/apple-icon-120.png and /dev/null differ diff --git a/src/__snapshots__/visual/output-png/apple-icon-152.png b/src/__snapshots__/visual/output-png/apple-icon-152.png deleted file mode 100644 index 01d87a64..00000000 Binary files a/src/__snapshots__/visual/output-png/apple-icon-152.png and /dev/null differ diff --git a/src/__snapshots__/visual/output-png/apple-icon-167.png b/src/__snapshots__/visual/output-png/apple-icon-167.png deleted file mode 100644 index ccb9e043..00000000 Binary files a/src/__snapshots__/visual/output-png/apple-icon-167.png and /dev/null differ diff --git a/src/__snapshots__/visual/output-transparent/apple-icon-120.png b/src/__snapshots__/visual/output-transparent/apple-icon-120.png deleted file mode 100644 index 4e26112f..00000000 Binary files a/src/__snapshots__/visual/output-transparent/apple-icon-120.png and /dev/null differ diff --git a/src/__snapshots__/visual/output-transparent/apple-icon-152.png b/src/__snapshots__/visual/output-transparent/apple-icon-152.png deleted file mode 100644 index aee665a8..00000000 Binary files a/src/__snapshots__/visual/output-transparent/apple-icon-152.png and /dev/null differ diff --git a/src/__snapshots__/visual/output-transparent/apple-icon-167.png b/src/__snapshots__/visual/output-transparent/apple-icon-167.png deleted file mode 100644 index 6bb1e48f..00000000 Binary files a/src/__snapshots__/visual/output-transparent/apple-icon-167.png and /dev/null differ diff --git a/src/config/constants.ts b/src/config/constants.ts index 2a4510a4..feb753de 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -161,7 +161,8 @@ export default { 'https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/adaptivity-and-layout/', // Apple platform specs: https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/ - APPLE_ICON_SIZES: [180, 167, 152, 120], + // https://web.dev/apple-touch-icon/ + APPLE_ICON_SIZES: [180], // Android platform specs: https://developers.google.com/web/fundamentals/web-app-manifest/#icons // Windows platform specs: https://docs.microsoft.com/en-us/microsoft-edge/progressive-web-apps/get-started @@ -221,14 +222,8 @@ export default { `, - APPLE_TOUCH_ICON_META_HTML: ( - size: number, - url: string, - xhtml: boolean, - ): string => - ` + APPLE_TOUCH_ICON_META_HTML: (url: string, xhtml: boolean): string => + ` `, APPLE_LAUNCH_SCREEN_META_HTML: ( diff --git a/src/helpers/meta.ts b/src/helpers/meta.ts index e94881e1..021f6d36 100644 --- a/src/helpers/meta.ts +++ b/src/helpers/meta.ts @@ -64,9 +64,8 @@ const generateAppleTouchIconHtml = ( .filter((image) => image.name.startsWith(constants.APPLE_ICON_FILENAME_PREFIX), ) - .map(({ width, path, name }) => + .map(({ path, name }) => constants.APPLE_TOUCH_ICON_META_HTML( - width, generateOutputPath(options, name, path), options.xhtml, ), diff --git a/src/helpers/puppets.ts b/src/helpers/puppets.ts index d2ae08a8..9ef3e689 100644 --- a/src/helpers/puppets.ts +++ b/src/helpers/puppets.ts @@ -185,7 +185,7 @@ const saveImages = async ( return Promise.all( imageList.map(async ({ name, width, height, scaleFactor, orientation }) => { const { quality } = options; - const type = name.includes('manifest') ? 'png' : options.type; + const type = name.includes('icon') ? 'png' : options.type; const path = file.getImageSavePath(name, output, type); try {