-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: give the user more options to specifiy where to inject html
- Loading branch information
1 parent
1c0ee82
commit c8a4767
Showing
56 changed files
with
193 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!doctype html><html><head><link rel="shortcut icon" href="/assets/favicon.ico"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="manifest" href="/assets/manifest.json"><meta name="mobile-web-app-capable" content="yes"><meta name="theme-color" content="#fff"><meta name="application-name"><link rel="apple-touch-icon" sizes="57x57" href="/assets/apple-touch-icon-57x57.png"><link rel="apple-touch-icon" sizes="60x60" href="/assets/apple-touch-icon-60x60.png"><link rel="apple-touch-icon" sizes="72x72" href="/assets/apple-touch-icon-72x72.png"><link rel="apple-touch-icon" sizes="76x76" href="/assets/apple-touch-icon-76x76.png"><link rel="apple-touch-icon" sizes="114x114" href="/assets/apple-touch-icon-114x114.png"><link rel="apple-touch-icon" sizes="120x120" href="/assets/apple-touch-icon-120x120.png"><link rel="apple-touch-icon" sizes="144x144" href="/assets/apple-touch-icon-144x144.png"><link rel="apple-touch-icon" sizes="152x152" href="/assets/apple-touch-icon-152x152.png"><link rel="apple-touch-icon" sizes="167x167" href="/assets/apple-touch-icon-167x167.png"><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon-180x180.png"><link rel="apple-touch-icon" sizes="1024x1024" href="/assets/apple-touch-icon-1024x1024.png"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta name="apple-mobile-web-app-title"><link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" href="/assets/apple-touch-startup-image-320x460.png"><link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" href="/assets/apple-touch-startup-image-640x920.png"><link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" href="/assets/apple-touch-startup-image-640x1096.png"><link rel="apple-touch-startup-image" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)" href="/assets/apple-touch-startup-image-750x1294.png"><link rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)" href="/assets/apple-touch-startup-image-1182x2208.png"><link rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)" href="/assets/apple-touch-startup-image-1242x2148.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" href="/assets/apple-touch-startup-image-748x1024.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" href="/assets/apple-touch-startup-image-768x1004.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" href="/assets/apple-touch-startup-image-1496x2048.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" href="/assets/apple-touch-startup-image-1536x2008.png"><link rel="icon" type="image/png" sizes="228x228" href="/assets/coast-228x228.png"><meta name="msapplication-TileColor" content="#fff"><meta name="msapplication-TileImage" content="/assets/mstile-144x144.png"><meta name="msapplication-config" content="/assets/browserconfig.xml"><link rel="yandex-tableau-widget" href="/assets/yandex-browser-manifest.json"></head><body></body></html> |
Binary file added
BIN
+3.24 KB
test/fixtures/expected/multiplehtml/assets/android-chrome-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.75 KB
test/fixtures/expected/multiplehtml/assets/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.35 KB
test/fixtures/expected/multiplehtml/assets/android-chrome-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+838 Bytes
test/fixtures/expected/multiplehtml/assets/android-chrome-36x36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.12 KB
test/fixtures/expected/multiplehtml/assets/android-chrome-384x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.1 KB
test/fixtures/expected/multiplehtml/assets/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.62 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.64 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.01 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.2 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.42 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-167x167.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.11 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.28 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.27 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.75 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.11 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-icon-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.6 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-1182x2208.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.4 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-1242x2148.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.1 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-1496x2048.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.1 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-1536x2008.png
Oops, something went wrong.
Binary file added
BIN
+7.79 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-320x460.png
Oops, something went wrong.
Binary file added
BIN
+18.2 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-640x1096.png
Oops, something went wrong.
Binary file added
BIN
+17.1 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-640x920.png
Oops, something went wrong.
Binary file added
BIN
+18.6 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-748x1024.png
Oops, something went wrong.
Binary file added
BIN
+22.1 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-750x1294.png
Oops, something went wrong.
Binary file added
BIN
+21.7 KB
test/fixtures/expected/multiplehtml/assets/apple-touch-startup-image-768x1004.png
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
test/fixtures/expected/multiplehtml/assets/browserconfig.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<browserconfig> | ||
<msapplication> | ||
<tile> | ||
<square70x70logo src="/assets/mstile-70x70.png"/> | ||
<square150x150logo src="/assets/mstile-150x150.png"/> | ||
<wide310x150logo src="/assets/mstile-310x150.png"/> | ||
<square310x310logo src="/assets/mstile-310x310.png"/> | ||
<TileColor>#fff</TileColor> | ||
|
||
</tile> | ||
|
||
</msapplication> | ||
|
||
</browserconfig> |
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"name": null, | ||
"short_name": null, | ||
"description": null, | ||
"dir": "auto", | ||
"lang": "en-US", | ||
"display": "standalone", | ||
"orientation": "any", | ||
"start_url": "/?homescreen=1", | ||
"background_color": "#fff", | ||
"theme_color": "#fff", | ||
"icons": [ | ||
{ | ||
"src": "/assets/android-chrome-36x36.png", | ||
"sizes": "36x36", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-48x48.png", | ||
"sizes": "48x48", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-72x72.png", | ||
"sizes": "72x72", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-96x96.png", | ||
"sizes": "96x96", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-144x144.png", | ||
"sizes": "144x144", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-256x256.png", | ||
"sizes": "256x256", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-384x384.png", | ||
"sizes": "384x384", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/assets/android-chrome-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
test/fixtures/expected/multiplehtml/assets/manifest.webapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"version": "1.0", | ||
"name": null, | ||
"description": null, | ||
"icons": { | ||
"60": "/assets/firefox_app_60x60.png", | ||
"128": "/assets/firefox_app_128x128.png", | ||
"512": "/assets/firefox_app_512x512.png" | ||
}, | ||
"developer": { | ||
"name": null, | ||
"url": null | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
test/fixtures/expected/multiplehtml/assets/yandex-browser-manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"version": "1.0", | ||
"api_version": 1, | ||
"layout": { | ||
"logo": "/assets/yandex-browser-50x50.png", | ||
"color": "#fff", | ||
"show_title": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!doctype html><html><head></head><body></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const test = require('ava'); | ||
const path = require('path'); | ||
const fs = require('fs-extra'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const FaviconsWebpackPlugin = require('../'); | ||
|
||
const { logo, mkdir, generate, compare, expected } = require('./util'); | ||
|
||
test.beforeEach(async t => t.context.root = await mkdir()); | ||
|
||
test('should allow handling multiple html-webpack-plugin', async t => { | ||
const dist = path.join(t.context.root, 'dist'); | ||
await generate({ | ||
context: t.context.root, | ||
output: { | ||
path: dist, | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
filename: 'a.html', | ||
}), | ||
new HtmlWebpackPlugin({ | ||
filename: 'b.html', | ||
}), | ||
new FaviconsWebpackPlugin({ | ||
logo, | ||
inject: htmlPlugin => htmlPlugin.options.filename === 'a.html', | ||
}), | ||
], | ||
}); | ||
|
||
t.deepEqual(await compare(dist, path.resolve(expected, 'multiplehtml')), []); | ||
}); | ||
|
||
test.afterEach(t => fs.remove(t.context.root)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters