diff --git a/src/config/html.json b/src/config/html.json index ae439428..c9b22fe3 100644 --- a/src/config/html.json +++ b/src/config/html.json @@ -35,9 +35,9 @@ "link[rel='icon'][type='image/png'][sizes='228x228'][href$='coast-228x228.png']": "" }, "favicons": { - "link[rel='icon'][type='image/png'][sizes='32x32'][href$='favicon-32x32.png']": "", + "link[rel='shortcut icon'][href$='favicon.ico']": "", "link[rel='icon'][type='image/png'][sizes='16x16'][href$='favicon-16x16.png']": "", - "link[rel='shortcut icon'][href$='favicon.ico']": "" + "link[rel='icon'][type='image/png'][sizes='32x32'][href$='favicon-32x32.png']": "" }, "windows": { "meta[name='msapplication-TileColor']": "", diff --git a/src/index.js b/src/index.js index 8d55f9ea..54d810af 100644 --- a/src/index.js +++ b/src/index.js @@ -97,9 +97,13 @@ function favicons(source, options = {}, next) { async function create(sourceset) { const responses = []; - const platforms = Object.keys(options.icons).filter( - platform => options.icons[platform] - ); + const platforms = Object.keys(options.icons) + .filter(platform => options.icons[platform]) + .sort((a, b) => { + if (a === "favicons") return -1; + if (b === "favicons") return 1; + return a.localeCompare(b); + }); for (const platform of platforms) { responses.push(await createPlatform(sourceset, platform)); @@ -108,7 +112,7 @@ function favicons(source, options = {}, next) { return { images: [].concat(...responses.map(r => r[0])), files: [].concat(...responses.map(r => r[1])), - html: [].concat(...responses.map(r => r[2])).sort() + html: [].concat(...responses.map(r => r[2])) }; } diff --git a/test/snapshots/array.test.js.md b/test/snapshots/array.test.js.md index b0ff65c2..6476b8a6 100644 --- a/test/snapshots/array.test.js.md +++ b/test/snapshots/array.test.js.md @@ -10551,15 +10551,25 @@ Generated by [AVA](https://ava.li). efbbef3e 5925ff0f d09494a3 c20d31f9 00000000 49454e44 ae426082 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -10567,24 +10577,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/array.test.js.snap b/test/snapshots/array.test.js.snap index 4e0d92c9..1fdd6dc7 100644 Binary files a/test/snapshots/array.test.js.snap and b/test/snapshots/array.test.js.snap differ diff --git a/test/snapshots/background.test.js.md b/test/snapshots/background.test.js.md index 1adda6b2..24daeb5f 100644 --- a/test/snapshots/background.test.js.md +++ b/test/snapshots/background.test.js.md @@ -11549,15 +11549,25 @@ Generated by [AVA](https://ava.li). ee9315f2 bf360c9d 7e4e787a f2000000 0049454e 44ae4260 82 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -11565,24 +11575,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/background.test.js.snap b/test/snapshots/background.test.js.snap index bbb86591..6af1e291 100644 Binary files a/test/snapshots/background.test.js.snap and b/test/snapshots/background.test.js.snap differ diff --git a/test/snapshots/default.test.js.md b/test/snapshots/default.test.js.md index 541b5af3..a158dd29 100644 --- a/test/snapshots/default.test.js.md +++ b/test/snapshots/default.test.js.md @@ -11675,15 +11675,25 @@ Generated by [AVA](https://ava.li). ee9315f2 bf360c9d 7e4e787a f2000000 0049454e 44ae4260 82 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -11691,24 +11701,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/default.test.js.snap b/test/snapshots/default.test.js.snap index a4665f5a..5f1bc4a5 100644 Binary files a/test/snapshots/default.test.js.snap and b/test/snapshots/default.test.js.snap differ diff --git a/test/snapshots/meta.test.js.md b/test/snapshots/meta.test.js.md index 42c6f22e..763676b1 100644 --- a/test/snapshots/meta.test.js.md +++ b/test/snapshots/meta.test.js.md @@ -13570,15 +13570,25 @@ Generated by [AVA](https://ava.li). 00000049 454e44ae 426082 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -13586,24 +13596,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": "PWA",␊ diff --git a/test/snapshots/meta.test.js.snap b/test/snapshots/meta.test.js.snap index 0aa1efba..a0846641 100644 Binary files a/test/snapshots/meta.test.js.snap and b/test/snapshots/meta.test.js.snap differ diff --git a/test/snapshots/offset.test.js.md b/test/snapshots/offset.test.js.md index a73b03b0..6b0bff92 100644 --- a/test/snapshots/offset.test.js.md +++ b/test/snapshots/offset.test.js.md @@ -9619,15 +9619,25 @@ Generated by [AVA](https://ava.li). ff007036 ede72b40 1f060000 00004945 4e44ae42 6082 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -9635,24 +9645,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/offset.test.js.snap b/test/snapshots/offset.test.js.snap index 73cb6e8f..fb3f5cbb 100644 Binary files a/test/snapshots/offset.test.js.snap and b/test/snapshots/offset.test.js.snap differ diff --git a/test/snapshots/overlayshadow.test.js.md b/test/snapshots/overlayshadow.test.js.md index de6a6a1b..44ccbbff 100644 --- a/test/snapshots/overlayshadow.test.js.md +++ b/test/snapshots/overlayshadow.test.js.md @@ -2519,9 +2519,9 @@ Generated by [AVA](https://ava.li). ], 'index.html': [ '', - '', '', '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/overlayshadow.test.js.snap b/test/snapshots/overlayshadow.test.js.snap index 6ab28526..8f905893 100644 Binary files a/test/snapshots/overlayshadow.test.js.snap and b/test/snapshots/overlayshadow.test.js.snap differ diff --git a/test/snapshots/pipehtml.test.js.md b/test/snapshots/pipehtml.test.js.md index c600f8d3..540f5eed 100644 --- a/test/snapshots/pipehtml.test.js.md +++ b/test/snapshots/pipehtml.test.js.md @@ -9,15 +9,25 @@ Generated by [AVA](https://ava.li). > Snapshot 1 { - contents: `␊ - ␊ - ␊ - ␊ - ␊ + contents: `␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ @@ -25,23 +35,13 @@ Generated by [AVA](https://ava.li). ␊ - ␊ + ␊ - ␊ - ␊ - ␊ - ␊ - ␊ - ␊ - ␊ - ␊ - ␊ - ␊ - `, + `, name: 'filename.html', } diff --git a/test/snapshots/pipehtml.test.js.snap b/test/snapshots/pipehtml.test.js.snap index 456b97ca..efafd3b4 100644 Binary files a/test/snapshots/pipehtml.test.js.snap and b/test/snapshots/pipehtml.test.js.snap differ diff --git a/test/snapshots/prefixed.test.js.md b/test/snapshots/prefixed.test.js.md index 0510c1d0..be20af07 100644 --- a/test/snapshots/prefixed.test.js.md +++ b/test/snapshots/prefixed.test.js.md @@ -11675,15 +11675,25 @@ Generated by [AVA](https://ava.li). ee9315f2 bf360c9d 7e4e787a f2000000 0049454e 44ae4260 82 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -11691,24 +11701,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/prefixed.test.js.snap b/test/snapshots/prefixed.test.js.snap index 7b33c852..7b10af20 100644 Binary files a/test/snapshots/prefixed.test.js.snap and b/test/snapshots/prefixed.test.js.snap differ diff --git a/test/snapshots/promise.test.js.md b/test/snapshots/promise.test.js.md index 66538620..12886650 100644 --- a/test/snapshots/promise.test.js.md +++ b/test/snapshots/promise.test.js.md @@ -11675,15 +11675,25 @@ Generated by [AVA](https://ava.li). ee9315f2 bf360c9d 7e4e787a f2000000 0049454e 44ae4260 82 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -11691,24 +11701,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/promise.test.js.snap b/test/snapshots/promise.test.js.snap index 06a46821..be1bc591 100644 Binary files a/test/snapshots/promise.test.js.snap and b/test/snapshots/promise.test.js.snap differ diff --git a/test/snapshots/stream.test.js.md b/test/snapshots/stream.test.js.md index 68a6b59b..34d2310a 100644 --- a/test/snapshots/stream.test.js.md +++ b/test/snapshots/stream.test.js.md @@ -11675,15 +11675,25 @@ Generated by [AVA](https://ava.li). ee9315f2 bf360c9d 7e4e787a f2000000 0049454e 44ae4260 82 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -11691,24 +11701,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': Buffer @Uint8Array [ 7b0a2020 226e616d 65223a20 6e756c6c 2c0a2020 2273686f 72745f6e 616d6522 diff --git a/test/snapshots/stream.test.js.snap b/test/snapshots/stream.test.js.snap index ecff9065..d24576ac 100644 Binary files a/test/snapshots/stream.test.js.snap and b/test/snapshots/stream.test.js.snap differ diff --git a/test/snapshots/svg.test.js.md b/test/snapshots/svg.test.js.md index c41e0cf3..7d5734f9 100644 --- a/test/snapshots/svg.test.js.md +++ b/test/snapshots/svg.test.js.md @@ -10551,15 +10551,25 @@ Generated by [AVA](https://ava.li). efbbef3e 5925ff0f d09494a3 c20d31f9 00000000 49454e44 ae426082 ], 'index.html': [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', '', '', '', '', - '', - '', - '', - '', + '', + '', + '', '', '', '', @@ -10567,24 +10577,14 @@ Generated by [AVA](https://ava.li). '', '', '', - '', '', + '', '', - '', '', - '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', ], 'manifest.json': `{␊ "name": null,␊ diff --git a/test/snapshots/svg.test.js.snap b/test/snapshots/svg.test.js.snap index c15ed305..770e3c49 100644 Binary files a/test/snapshots/svg.test.js.snap and b/test/snapshots/svg.test.js.snap differ