diff --git a/README.md b/README.md index ffb5f797..74dbad23 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,22 @@ If the webpack mode is set to `production` the favicons mode will use `webapp`. This behaviour can be adjusted by setting the favicon `mode` and `devMode` options. +### Custom manifests + +The manifest options allows to overwrite values of the generated manifest.json with own values + +```javascript +const FaviconsWebpackPlugin = require('favicons-webpack-plugin') + +plugins: [ + new FaviconsWebpackPlugin({ + logo: './src/logo.png', + mode: 'webapp', + manifest: './src/manigest.json' + }) +] +``` + ## Compatibility favicons-webpack-plugin 2.x is compatible with html-webpack-plugin 3.x diff --git a/example/custom-manifest/package.json b/example/custom-manifest/package.json new file mode 100644 index 00000000..3e692b48 --- /dev/null +++ b/example/custom-manifest/package.json @@ -0,0 +1,10 @@ +{ + "name": "webapp-example", + "version": "1.0.0", + "description": "Demo of webpapp webpack plugin", + "scripts": { + }, + "keywords": [], + "author": "", + "license": "MIT" +} diff --git a/example/custom-manifest/src/app.js b/example/custom-manifest/src/app.js new file mode 100644 index 00000000..e69de29b diff --git a/example/custom-manifest/src/favicon.png b/example/custom-manifest/src/favicon.png new file mode 100644 index 00000000..0d393c5a Binary files /dev/null and b/example/custom-manifest/src/favicon.png differ diff --git a/example/custom-manifest/src/favicon.svg b/example/custom-manifest/src/favicon.svg new file mode 100644 index 00000000..484fd764 --- /dev/null +++ b/example/custom-manifest/src/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/example/custom-manifest/src/index.html b/example/custom-manifest/src/index.html new file mode 100644 index 00000000..0cdd1b18 --- /dev/null +++ b/example/custom-manifest/src/index.html @@ -0,0 +1,14 @@ + + + + + + + + Home + + + + + + \ No newline at end of file diff --git a/example/custom-manifest/src/manifest.json b/example/custom-manifest/src/manifest.json new file mode 100644 index 00000000..c6af7238 --- /dev/null +++ b/example/custom-manifest/src/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "FaviconsDemo", + "short_name": "FaviconsDemo", + "description": "Just a demo", + "dir": "auto", + "lang": "en", + "display": "standalone", + "background_color": "#fff", + "theme_color": "#fff", + "orientation": null +} \ No newline at end of file diff --git a/example/custom-manifest/webpack.config.js b/example/custom-manifest/webpack.config.js new file mode 100644 index 00000000..1566aaaa --- /dev/null +++ b/example/custom-manifest/webpack.config.js @@ -0,0 +1,32 @@ +const { resolve } = require('path'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const FaviconsWebpackPlugin = require('../../src/'); + +const webpack = require('webpack'); + +module.exports = (env, args) => { + return { + context: __dirname, + entry: './src/app.js', + output: { + path: resolve(__dirname, 'public'), + filename: 'app.js', + }, + cache: { + type: 'filesystem', + }, + plugins: [ + new HtmlWebpackPlugin({ + filename: 'index.html', + template: './src/index.html', + }), + new FaviconsWebpackPlugin({ + logo: './src/favicon.png', + manifest: './src/manifest.json', + mode: 'webapp' + + }), + ], + stats: "errors-only" + }; +} diff --git a/src/cache.js b/src/cache.js index a3a782e2..362eec96 100644 --- a/src/cache.js +++ b/src/cache.js @@ -30,29 +30,27 @@ const faviconCache = new WeakMap(); * Executes the generator function and caches the result in memory * The cache will be invalidated after the logo source file was modified * - * @param {import('./options').FaviconWebpackPlugionInternalOptions} faviconOptions - * @param {string} context - the compiler.context patth - * @param {WebpackCompilation} compilation - the current webpack compilation + * @template TResult + * + * @param {string[]} files * @param {any} pluginInstance - the plugin instance to use as cache key - * @param {( - logoSource: Buffer | string, - compilation: WebpackCompilation, - resolvedPublicPath: string, - outputPath: string - ) => Promise - } generator + * @param {boolean} useWebpackCache - Support webpack built in cache + * @param {WebpackCompilation} compilation - the current webpack compilation + * @param {string[]} eTags - eTags to verify the string + * @param {(files: { filePath: string, hash: string, content: Buffer }[]) => string} idGenerator + * @param {(files: { filePath: string, hash: string, content: Buffer }[], id: string) => Promise} generator * - * @returns {Promise} + * @returns {Promise} */ function runCached( - faviconOptions, - context, - compilation, + files, pluginInstance, + useWebpackCache, + compilation, + eTags, + idGenerator, generator ) { - const { logo } = faviconOptions; - const latestSnapShot = snapshots.get(pluginInstance); const cachedFavicons = latestSnapShot && faviconCache.get(latestSnapShot); @@ -64,10 +62,11 @@ function runCached( faviconCache.delete(latestSnapShot); return runCached( - faviconOptions, - context, - compilation, + files, pluginInstance, + compilation, + idGenerator, + eTags, generator ); } @@ -81,21 +80,19 @@ function runCached( // to find out if the logo was changed const newSnapShot = createSnapshot( { - fileDependencies: [logo], + fileDependencies: files, contextDependencies: [], missingDependencies: [] }, compilation ); snapshots.set(pluginInstance, newSnapShot); - // Start generating the favicons - const faviconsGenerationsPromise = runWithFileCache( - faviconOptions, - context, - compilation, - generator - ); + const faviconsGenerationsPromise = useWebpackCache + ? runWithFileCache(files, compilation, idGenerator, eTags, generator) + : readFiles(files, compilation).then(fileContents => + generator(fileContents, idGenerator(fileContents)) + ); // Store the promise of the favicon compilation in cache faviconCache.set(newSnapShot, faviconsGenerationsPromise); @@ -128,101 +125,68 @@ function createSnapshot(fileDependencies, mainCompilation) { } /** + * + * Use the webpack cache which supports filesystem caching to improve build speed + * See also https://webpack.js.org/configuration/other-options/#cache + * Create one cache for every output target + * * Executes the generator function and stores it in the webpack file cache + * @template TResult * - * @param {import('./options').FaviconWebpackPlugionInternalOptions} faviconOptions - * @param {string} context - the compiler.context patth + * @param {string[]} files - the file pathes to be watched for changes * @param {WebpackCompilation} compilation - the current webpack compilation - * @param {( - logoSource: Buffer | string, - compilation: WebpackCompilation, - resolvedPublicPath: string, - outputPath: string - ) => Promise - } generator + * @param {(files: { filePath: string, hash: string, content: Buffer }[]) => string} idGenerator + * @param {string[]} eTags - eTags to verify the string + * @param {(files: { filePath: string, hash: string, content: Buffer }[], id: string) => Promise} generator * - * @returns {Promise} + * @returns {Promise} */ async function runWithFileCache( - faviconOptions, - context, + files, compilation, + idGenerator, + eTags, generator ) { - const { logo } = faviconOptions; - const logoSource = await new Promise((resolve, reject) => - compilation.inputFileSystem.readFile( - path.resolve(context, logo), - (error, fileBuffer) => { - if (error) { - reject(error); - } else { - resolve(fileBuffer); - } - } - ) - ); - - const compilationOutputPath = - compilation.outputOptions.path === 'auto' - ? '' - : compilation.outputOptions.path || ''; - /** - * the relative output path to the folder where the favicon files should be generated to - * it might include tokens like [fullhash] or [contenthash] - */ - const relativeOutputPath = faviconOptions.outputPath - ? path.relative( - compilationOutputPath, - path.resolve(compilationOutputPath, faviconOptions.outputPath) - ) - : faviconOptions.prefix; - - const logoContentHash = getContentHash(logoSource); - const executeGenerator = () => { - const outputPath = replaceContentHash( - compilation, - relativeOutputPath, - logoContentHash - ); - const webpackPublicPath = - compilation.outputOptions.publicPath === 'auto' - ? '' - : compilation.outputOptions.publicPath; - const resolvedPublicPath = replaceContentHash( - compilation, - resolvePublicPath( - compilation, - faviconOptions.publicPath || webpackPublicPath, - faviconOptions.prefix - ), - logoContentHash - ); - return generator(logoSource, compilation, resolvedPublicPath, outputPath); - }; - - if (faviconOptions.cache === false) { - return executeGenerator(); - } - + const fileSources = await readFiles(files, compilation); const webpackCache = compilation.getCache('favicons-webpack-plugin'); // Cache invalidation token - const eTag = [ - JSON.stringify(faviconOptions.publicPath), - JSON.stringify(faviconOptions.mode), - // Recompile filesystem cache if the user change the favicon options - JSON.stringify(faviconOptions.favicons), - // Recompile filesystem cache if the logo source changes: - logoContentHash - ].join('\n'); - - // Use the webpack cache which supports filesystem caching to improve build speed - // See also https://webpack.js.org/configuration/other-options/#cache - // Create one cache for every output target - return webpackCache.providePromise( - relativeOutputPath, - eTag, - executeGenerator + const eTag = [...eTags, fileSources.map(({ hash }) => hash)].join(' '); + const cacheId = idGenerator(fileSources); + return webpackCache.providePromise(cacheId, eTag, () => + generator(fileSources, cacheId) + ); +} + +/** + * readFiles and get content hashes + * + * @param {string[]} files + * @param {WebpackCompilation} compilation + * @returns {Promise<{filePath: string, hash: string, content: Buffer}[]>} + */ +function readFiles(files, compilation) { + return Promise.all( + files.map(filePath => + !filePath + ? { filePath, hash: '', content: '' } + : new Promise((resolve, reject) => + compilation.inputFileSystem.readFile( + path.resolve(compilation.compiler.context, filePath), + (error, fileBuffer) => { + if (error) { + reject(error); + } else { + resolve({ + filePath, + hash: getContentHash(fileBuffer), + content: fileBuffer + }); + } + } + ) + ) + ) ); } diff --git a/src/index.js b/src/index.js index e08b584b..4ae25cf8 100644 --- a/src/index.js +++ b/src/index.js @@ -6,6 +6,7 @@ const path = require('path'); const { runCached } = require('./cache'); const Oracle = require('./oracle'); const url = require('url'); +const { resolvePublicPath, replaceContentHash } = require('./hash'); /** @type {WeakMap}>>} */ const faviconCompilations = new WeakMap(); @@ -24,6 +25,7 @@ class FaviconsWebpackPlugin { cache: true, inject: true, favicons: emptyFaviconsConfig, + manifest: {}, prefix: 'assets/', ...options }; @@ -83,11 +85,32 @@ class FaviconsWebpackPlugin { 'FaviconsWebpackPlugin', async compilation => { const faviconCompilation = runCached( - this.options, - compiler.context, - compilation, + [ + this.options.logo, + typeof this.options.manifest === 'string' + ? this.options.manifest + : '' + ], this, - this.generateFavicons.bind(this) + this.options.cache, + compilation, + // Options which enforce a new recompilation + [ + JSON.stringify(this.options.publicPath), + JSON.stringify(this.options.mode), + // Recompile filesystem cache if the user change the favicon options + JSON.stringify(this.options.favicons) + ], + // Recompile filesystem cache if the logo source based path change: + ([logo]) => + getRelativeOutputPath(logo.hash, compilation, this.options), + ([logo, manifest], getRelativeOutputPath) => + this.generateFavicons( + logo, + manifest.content, + compilation, + getRelativeOutputPath + ) ); // Watch for changes to the logo @@ -238,12 +261,17 @@ class FaviconsWebpackPlugin { /** * Generate the favicons * - * @param {Buffer | string} logoSource + * @param {{content: Buffer | string, hash: string}} logo + * @param {Buffer | string} manifest * @param {import('webpack').Compilation} compilation - * @param {string} resolvedPublicPath * @param {string} outputPath */ - generateFavicons(logoSource, compilation, resolvedPublicPath, outputPath) { + generateFavicons(logo, manifest, compilation, outputPath) { + const resolvedPublicPath = getResolvedPublicPath( + logo.hash, + compilation, + this.options + ); switch (this.getCurrentCompilationMode(compilation.compiler)) { case 'light': if (!this.options.mode) { @@ -253,7 +281,7 @@ class FaviconsWebpackPlugin { } return this.generateFaviconsLight( - logoSource, + logo.content, compilation, resolvedPublicPath, outputPath @@ -261,7 +289,8 @@ class FaviconsWebpackPlugin { case 'webapp': default: return this.generateFaviconsWebapp( - logoSource, + logo.content, + manifest ? JSON.parse(manifest.toString()) : this.options.manifest, compilation, resolvedPublicPath, outputPath @@ -307,12 +336,14 @@ class FaviconsWebpackPlugin { * supports all common browsers and devices * * @param {Buffer | string} logoSource + * @param {{[key: string]: any}} baseManifest * @param {import('webpack').Compilation} compilation * @param {string} resolvedPublicPath * @param {string} outputPath */ async generateFaviconsWebapp( logoSource, + baseManifest, compilation, resolvedPublicPath, outputPath @@ -327,7 +358,23 @@ class FaviconsWebpackPlugin { path: '', ...this.options.favicons }); - const assets = [...images, ...files].map(({ name, contents }) => ({ + + const modifiedFiles = files.map(file => { + if (file.name.endsWith('manifest.json')) { + const generatedManifest = JSON.parse(file.contents.toString('utf-8')); + return { + ...file, + contents: JSON.stringify( + mergeManifests(generatedManifest, baseManifest), + null, + 2 + ) + }; + } + return file; + }); + + const assets = [...images, ...modifiedFiles].map(({ name, contents }) => ({ name: outputPath ? path.join(outputPath, name) : name, contents: new RawSource(contents, false) })); @@ -351,6 +398,79 @@ class FaviconsWebpackPlugin { } } +/** + * Get the filepath relative to the output directory + * where the logos should be placed + * + * @param {string} logoContentHash + * @param {import('webpack').Compilation} compilation + * @param {import('./options').FaviconWebpackPlugionInternalOptions} faviconOptions + */ +function getRelativeOutputPath(logoContentHash, compilation, faviconOptions) { + const compilationOutputPath = + compilation.outputOptions.path === 'auto' + ? '' + : compilation.outputOptions.path || ''; + /** + * the relative output path to the folder where the favicon files should be generated to + * it might include tokens like [fullhash] or [contenthash] + */ + const relativeOutputPath = faviconOptions.outputPath + ? path.relative( + compilationOutputPath, + path.resolve(compilationOutputPath, faviconOptions.outputPath) + ) + : faviconOptions.prefix; + + return replaceContentHash(compilation, relativeOutputPath, logoContentHash); +} + +/** + * + * @param {string} logoContentHash + * @param {import('webpack').Compilation} compilation + * @param {import('./options').FaviconWebpackPlugionInternalOptions} faviconOptions + */ +function getResolvedPublicPath(logoContentHash, compilation, faviconOptions) { + const webpackPublicPath = + compilation.outputOptions.publicPath === 'auto' + ? '' + : compilation.outputOptions.publicPath; + + return replaceContentHash( + compilation, + resolvePublicPath( + compilation, + faviconOptions.publicPath || webpackPublicPath, + faviconOptions.prefix + ), + logoContentHash + ); +} + +/** + * Merge two manifest.json files + * + * @param {{[key: string]: any}} manifest1 + * @param {{[key: string]: any}} manifest2 + */ +function mergeManifests(manifest1, manifest2) { + const mergedManifest = { ...manifest1 }; + Object.keys(manifest2).forEach(key => { + if (Array.isArray(mergedManifest[key]) && Array.isArray(manifest2[key])) { + mergedManifest[key] = mergedManifest[key].concat(manifest2[key]); + return; + } + mergedManifest[key] = manifest2[key]; + }); + Object.keys(mergedManifest).forEach(key => { + if (mergedManifest[key] === null) { + delete mergedManifest[key]; + } + }); + return mergedManifest; +} + /** * Verify that the html-webpack-plugin is compatible * @param {typeof import('html-webpack-plugin')} htmlWebpackPlugin diff --git a/src/options.d.ts b/src/options.d.ts index c351818e..a39ef8ba 100644 --- a/src/options.d.ts +++ b/src/options.d.ts @@ -52,8 +52,10 @@ export interface FaviconWebpackPlugionOptions { * Web app manifests are part of a collection of web technologies called progressive web apps (PWAs), * which are websites that can be installed to a device’s homescreen without an app store. * @see https://developer.mozilla.org/en-US/docs/Web/Manifest + * + * The manifest option allows to provide a filepath to a base manifest.json file or a base manifest configuration */ - manifest?: string | (() => void) + manifest?: string | { [key: string]: any } /** * Prefix path for generated assets */ diff --git a/test/fixtures/manifest.json b/test/fixtures/manifest.json new file mode 100644 index 00000000..7354569e --- /dev/null +++ b/test/fixtures/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "FaviconsDemo", + "short_name": "FaviconsDemo", + "description": "A manifest used for unit-testing", + "dir": "auto", + "lang": "en", + "display": "standalone", + "background_color": "#fff", + "theme_color": "#fff", + "orientation": null +} \ No newline at end of file diff --git a/test/manifest.file.test.js b/test/manifest.file.test.js new file mode 100644 index 00000000..60bd791f --- /dev/null +++ b/test/manifest.file.test.js @@ -0,0 +1,28 @@ +const test = require('ava'); +const path = require('path'); +const fs = require('fs-extra'); +const FaviconsWebpackPlugin = require('../'); + +const { logo, generate, mkdir, snapshotCompilationAssets } = require('./util'); + +test.beforeEach(async t => (t.context.root = await mkdir())); + +test('should generate a result with custom manifest values', async t => { + const dist = path.join(t.context.root, 'dist'); + const compilationStats = await generate({ + context: t.context.root, + output: { + path: dist + }, + plugins: [ + new FaviconsWebpackPlugin({ + logo, + manifest: path.resolve(__dirname, './fixtures/manifest.json') + }) + ] + }); + + snapshotCompilationAssets(t, compilationStats); +}); + +test.afterEach(t => fs.remove(t.context.root)); diff --git a/test/manifest.test.js b/test/manifest.test.js new file mode 100644 index 00000000..a16eebf3 --- /dev/null +++ b/test/manifest.test.js @@ -0,0 +1,38 @@ +const test = require('ava'); +const path = require('path'); +const fs = require('fs-extra'); +const FaviconsWebpackPlugin = require('../'); + +const { logo, generate, mkdir, snapshotCompilationAssets } = require('./util'); + +test.beforeEach(async t => (t.context.root = await mkdir())); + +test('should generate a result with custom manifest values', async t => { + const dist = path.join(t.context.root, 'dist'); + const compilationStats = await generate({ + context: t.context.root, + output: { + path: dist + }, + plugins: [ + new FaviconsWebpackPlugin({ + logo, + manifest: { + name: 'FaviconsDemo', + short_name: 'FaviconsDemo', + description: 'Just a demo', + dir: 'auto', + lang: 'en', + display: 'standalone', + background_color: '#fff', + theme_color: '#fff', + orientation: null + } + }) + ] + }); + + snapshotCompilationAssets(t, compilationStats); +}); + +test.afterEach(t => fs.remove(t.context.root)); diff --git a/test/snapshots/default.test.js.md b/test/snapshots/default.test.js.md index 22ed0e70..a1f08628 100644 --- a/test/snapshots/default.test.js.md +++ b/test/snapshots/default.test.js.md @@ -307,9 +307,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/default.test.js.snap b/test/snapshots/default.test.js.snap index 3ee7bf3a..4f973e92 100644 Binary files a/test/snapshots/default.test.js.snap and b/test/snapshots/default.test.js.snap differ diff --git a/test/snapshots/html.false.test.js.md b/test/snapshots/html.false.test.js.md index c87a681d..01c395f3 100644 --- a/test/snapshots/html.false.test.js.md +++ b/test/snapshots/html.false.test.js.md @@ -308,9 +308,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ @@ -738,9 +735,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ @@ -1168,9 +1162,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/html.false.test.js.snap b/test/snapshots/html.false.test.js.snap index 17a1ddb5..dfbcee80 100644 Binary files a/test/snapshots/html.false.test.js.snap and b/test/snapshots/html.false.test.js.snap differ diff --git a/test/snapshots/html.multiple.test.js.md b/test/snapshots/html.multiple.test.js.md index 1bcfc942..e24c3c03 100644 --- a/test/snapshots/html.multiple.test.js.md +++ b/test/snapshots/html.multiple.test.js.md @@ -505,9 +505,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/html.multiple.test.js.snap b/test/snapshots/html.multiple.test.js.snap index 6d526307..157cc82c 100644 Binary files a/test/snapshots/html.multiple.test.js.snap and b/test/snapshots/html.multiple.test.js.snap differ diff --git a/test/snapshots/html.true.test.js.md b/test/snapshots/html.true.test.js.md index 1ed33c16..4f676eff 100644 --- a/test/snapshots/html.true.test.js.md +++ b/test/snapshots/html.true.test.js.md @@ -308,9 +308,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ @@ -922,9 +919,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/html.true.test.js.snap b/test/snapshots/html.true.test.js.snap index 48f2a2d4..cf8ca691 100644 Binary files a/test/snapshots/html.true.test.js.snap and b/test/snapshots/html.true.test.js.snap differ diff --git a/test/snapshots/manifest.file.test.js.md b/test/snapshots/manifest.file.test.js.md new file mode 100644 index 00000000..4d0def3a --- /dev/null +++ b/test/snapshots/manifest.file.test.js.md @@ -0,0 +1,429 @@ +# Snapshot report for `test/manifest.file.test.js` + +The actual snapshot is saved in `manifest.file.test.js.snap`. + +Generated by [AVA](https://ava.li). + +## should generate a result with custom manifest values + +> Snapshot 1 + + [ + 'assets/android-chrome-144x144.png', + 'assets/android-chrome-192x192.png', + 'assets/android-chrome-256x256.png', + 'assets/android-chrome-36x36.png', + 'assets/android-chrome-384x384.png', + 'assets/android-chrome-48x48.png', + 'assets/android-chrome-512x512.png', + 'assets/android-chrome-72x72.png', + 'assets/android-chrome-96x96.png', + 'assets/apple-touch-icon-1024x1024.png', + 'assets/apple-touch-icon-114x114.png', + 'assets/apple-touch-icon-120x120.png', + 'assets/apple-touch-icon-144x144.png', + 'assets/apple-touch-icon-152x152.png', + 'assets/apple-touch-icon-167x167.png', + 'assets/apple-touch-icon-180x180.png', + 'assets/apple-touch-icon-57x57.png', + 'assets/apple-touch-icon-60x60.png', + 'assets/apple-touch-icon-72x72.png', + 'assets/apple-touch-icon-76x76.png', + 'assets/apple-touch-icon-precomposed.png', + 'assets/apple-touch-icon.png', + 'assets/apple-touch-startup-image-1125x2436.png', + 'assets/apple-touch-startup-image-1136x640.png', + 'assets/apple-touch-startup-image-1242x2208.png', + 'assets/apple-touch-startup-image-1242x2688.png', + 'assets/apple-touch-startup-image-1334x750.png', + 'assets/apple-touch-startup-image-1536x2048.png', + 'assets/apple-touch-startup-image-1620x2160.png', + 'assets/apple-touch-startup-image-1668x2224.png', + 'assets/apple-touch-startup-image-1668x2388.png', + 'assets/apple-touch-startup-image-1792x828.png', + 'assets/apple-touch-startup-image-2048x1536.png', + 'assets/apple-touch-startup-image-2048x2732.png', + 'assets/apple-touch-startup-image-2160x1620.png', + 'assets/apple-touch-startup-image-2208x1242.png', + 'assets/apple-touch-startup-image-2224x1668.png', + 'assets/apple-touch-startup-image-2388x1668.png', + 'assets/apple-touch-startup-image-2436x1125.png', + 'assets/apple-touch-startup-image-2688x1242.png', + 'assets/apple-touch-startup-image-2732x2048.png', + 'assets/apple-touch-startup-image-640x1136.png', + 'assets/apple-touch-startup-image-750x1334.png', + 'assets/apple-touch-startup-image-828x1792.png', + 'assets/browserconfig.xml', + 'assets/coast-228x228.png', + 'assets/favicon-16x16.png', + 'assets/favicon-32x32.png', + 'assets/favicon-48x48.png', + 'assets/favicon.ico', + 'assets/firefox_app_128x128.png', + 'assets/firefox_app_512x512.png', + 'assets/firefox_app_60x60.png', + 'assets/manifest.json', + 'assets/manifest.webapp', + 'assets/mstile-144x144.png', + 'assets/mstile-150x150.png', + 'assets/mstile-310x150.png', + 'assets/mstile-310x310.png', + 'assets/mstile-70x70.png', + 'assets/yandex-browser-50x50.png', + 'assets/yandex-browser-manifest.json', + 'main.js', + ] + +> Snapshot 2 + + [ + { + assetName: 'assets/android-chrome-144x144.png', + content: 'png 144x144', + }, + { + assetName: 'assets/android-chrome-192x192.png', + content: 'png 192x192', + }, + { + assetName: 'assets/android-chrome-256x256.png', + content: 'png 256x256', + }, + { + assetName: 'assets/android-chrome-36x36.png', + content: 'png 36x36', + }, + { + assetName: 'assets/android-chrome-384x384.png', + content: 'png 384x384', + }, + { + assetName: 'assets/android-chrome-48x48.png', + content: 'png 48x48', + }, + { + assetName: 'assets/android-chrome-512x512.png', + content: 'png 512x512', + }, + { + assetName: 'assets/android-chrome-72x72.png', + content: 'png 72x72', + }, + { + assetName: 'assets/android-chrome-96x96.png', + content: 'png 96x96', + }, + { + assetName: 'assets/apple-touch-icon-1024x1024.png', + content: 'png 1024x1024', + }, + { + assetName: 'assets/apple-touch-icon-114x114.png', + content: 'png 114x114', + }, + { + assetName: 'assets/apple-touch-icon-120x120.png', + content: 'png 120x120', + }, + { + assetName: 'assets/apple-touch-icon-144x144.png', + content: 'png 144x144', + }, + { + assetName: 'assets/apple-touch-icon-152x152.png', + content: 'png 152x152', + }, + { + assetName: 'assets/apple-touch-icon-167x167.png', + content: 'png 167x167', + }, + { + assetName: 'assets/apple-touch-icon-180x180.png', + content: 'png 180x180', + }, + { + assetName: 'assets/apple-touch-icon-57x57.png', + content: 'png 57x57', + }, + { + assetName: 'assets/apple-touch-icon-60x60.png', + content: 'png 60x60', + }, + { + assetName: 'assets/apple-touch-icon-72x72.png', + content: 'png 72x72', + }, + { + assetName: 'assets/apple-touch-icon-76x76.png', + content: 'png 76x76', + }, + { + assetName: 'assets/apple-touch-icon-precomposed.png', + content: 'png 180x180', + }, + { + assetName: 'assets/apple-touch-icon.png', + content: 'png 180x180', + }, + { + assetName: 'assets/apple-touch-startup-image-1125x2436.png', + content: 'png 1125x2436', + }, + { + assetName: 'assets/apple-touch-startup-image-1136x640.png', + content: 'png 1136x640', + }, + { + assetName: 'assets/apple-touch-startup-image-1242x2208.png', + content: 'png 1242x2208', + }, + { + assetName: 'assets/apple-touch-startup-image-1242x2688.png', + content: 'png 1242x2688', + }, + { + assetName: 'assets/apple-touch-startup-image-1334x750.png', + content: 'png 1334x750', + }, + { + assetName: 'assets/apple-touch-startup-image-1536x2048.png', + content: 'png 1536x2048', + }, + { + assetName: 'assets/apple-touch-startup-image-1620x2160.png', + content: 'png 1620x2160', + }, + { + assetName: 'assets/apple-touch-startup-image-1668x2224.png', + content: 'png 1668x2224', + }, + { + assetName: 'assets/apple-touch-startup-image-1668x2388.png', + content: 'png 1668x2388', + }, + { + assetName: 'assets/apple-touch-startup-image-1792x828.png', + content: 'png 1792x828', + }, + { + assetName: 'assets/apple-touch-startup-image-2048x1536.png', + content: 'png 2048x1536', + }, + { + assetName: 'assets/apple-touch-startup-image-2048x2732.png', + content: 'png 2048x2732', + }, + { + assetName: 'assets/apple-touch-startup-image-2160x1620.png', + content: 'png 2160x1620', + }, + { + assetName: 'assets/apple-touch-startup-image-2208x1242.png', + content: 'png 2208x1242', + }, + { + assetName: 'assets/apple-touch-startup-image-2224x1668.png', + content: 'png 2224x1668', + }, + { + assetName: 'assets/apple-touch-startup-image-2388x1668.png', + content: 'png 2388x1668', + }, + { + assetName: 'assets/apple-touch-startup-image-2436x1125.png', + content: 'png 2436x1125', + }, + { + assetName: 'assets/apple-touch-startup-image-2688x1242.png', + content: 'png 2688x1242', + }, + { + assetName: 'assets/apple-touch-startup-image-2732x2048.png', + content: 'png 2732x2048', + }, + { + assetName: 'assets/apple-touch-startup-image-640x1136.png', + content: 'png 640x1136', + }, + { + assetName: 'assets/apple-touch-startup-image-750x1334.png', + content: 'png 750x1334', + }, + { + assetName: 'assets/apple-touch-startup-image-828x1792.png', + content: 'png 828x1792', + }, + { + assetName: 'assets/browserconfig.xml', + content: `␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + #fff␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + `, + }, + { + assetName: 'assets/coast-228x228.png', + content: 'png 228x228', + }, + { + assetName: 'assets/favicon-16x16.png', + content: 'png 16x16', + }, + { + assetName: 'assets/favicon-32x32.png', + content: 'png 32x32', + }, + { + assetName: 'assets/favicon-48x48.png', + content: 'png 48x48', + }, + { + assetName: 'assets/favicon.ico', + content: 'ico 16x16', + }, + { + assetName: 'assets/firefox_app_128x128.png', + content: 'png 128x128', + }, + { + assetName: 'assets/firefox_app_512x512.png', + content: 'png 512x512', + }, + { + assetName: 'assets/firefox_app_60x60.png', + content: 'png 60x60', + }, + { + assetName: 'assets/manifest.json', + content: `{␊ + "name": "FaviconsDemo",␊ + "short_name": "FaviconsDemo",␊ + "description": "A manifest used for unit-testing",␊ + "dir": "auto",␊ + "lang": "en",␊ + "display": "standalone",␊ + "start_url": "/?homescreen=1",␊ + "background_color": "#fff",␊ + "theme_color": "#fff",␊ + "icons": [␊ + {␊ + "src": "android-chrome-36x36.png",␊ + "sizes": "36x36",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-48x48.png",␊ + "sizes": "48x48",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-72x72.png",␊ + "sizes": "72x72",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-96x96.png",␊ + "sizes": "96x96",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-144x144.png",␊ + "sizes": "144x144",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-192x192.png",␊ + "sizes": "192x192",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-256x256.png",␊ + "sizes": "256x256",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-384x384.png",␊ + "sizes": "384x384",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-512x512.png",␊ + "sizes": "512x512",␊ + "type": "image/png"␊ + }␊ + ]␊ + }`, + }, + { + assetName: 'assets/manifest.webapp', + content: `{␊ + "version": "1.0",␊ + "name": null,␊ + "description": null,␊ + "icons": {␊ + "60": "firefox_app_60x60.png",␊ + "128": "firefox_app_128x128.png",␊ + "512": "firefox_app_512x512.png"␊ + },␊ + "developer": {␊ + "name": null,␊ + "url": null␊ + }␊ + }`, + }, + { + assetName: 'assets/mstile-144x144.png', + content: 'png 144x144', + }, + { + assetName: 'assets/mstile-150x150.png', + content: 'png 150x150', + }, + { + assetName: 'assets/mstile-310x150.png', + content: 'png 310x150', + }, + { + assetName: 'assets/mstile-310x310.png', + content: 'png 310x310', + }, + { + assetName: 'assets/mstile-70x70.png', + content: 'png 70x70', + }, + { + assetName: 'assets/yandex-browser-50x50.png', + content: 'png 50x50', + }, + { + assetName: 'assets/yandex-browser-manifest.json', + content: `{␊ + "version": "1.0",␊ + "api_version": 1,␊ + "layout": {␊ + "logo": "yandex-browser-50x50.png",␊ + "color": "#fff",␊ + "show_title": true␊ + },␊ + "name": "FaviconsDemo",␊ + "short_name": "FaviconsDemo",␊ + "description": "A manifest used for unit-testing",␊ + "dir": "auto",␊ + "lang": "en",␊ + "display": "standalone",␊ + "background_color": "#fff",␊ + "theme_color": "#fff"␊ + }`, + }, + ] diff --git a/test/snapshots/manifest.file.test.js.snap b/test/snapshots/manifest.file.test.js.snap new file mode 100644 index 00000000..555a86d1 Binary files /dev/null and b/test/snapshots/manifest.file.test.js.snap differ diff --git a/test/snapshots/manifest.test.js.md b/test/snapshots/manifest.test.js.md new file mode 100644 index 00000000..413bd91f --- /dev/null +++ b/test/snapshots/manifest.test.js.md @@ -0,0 +1,429 @@ +# Snapshot report for `test/manifest.test.js` + +The actual snapshot is saved in `manifest.test.js.snap`. + +Generated by [AVA](https://ava.li). + +## should generate a result with custom manifest values + +> Snapshot 1 + + [ + 'assets/android-chrome-144x144.png', + 'assets/android-chrome-192x192.png', + 'assets/android-chrome-256x256.png', + 'assets/android-chrome-36x36.png', + 'assets/android-chrome-384x384.png', + 'assets/android-chrome-48x48.png', + 'assets/android-chrome-512x512.png', + 'assets/android-chrome-72x72.png', + 'assets/android-chrome-96x96.png', + 'assets/apple-touch-icon-1024x1024.png', + 'assets/apple-touch-icon-114x114.png', + 'assets/apple-touch-icon-120x120.png', + 'assets/apple-touch-icon-144x144.png', + 'assets/apple-touch-icon-152x152.png', + 'assets/apple-touch-icon-167x167.png', + 'assets/apple-touch-icon-180x180.png', + 'assets/apple-touch-icon-57x57.png', + 'assets/apple-touch-icon-60x60.png', + 'assets/apple-touch-icon-72x72.png', + 'assets/apple-touch-icon-76x76.png', + 'assets/apple-touch-icon-precomposed.png', + 'assets/apple-touch-icon.png', + 'assets/apple-touch-startup-image-1125x2436.png', + 'assets/apple-touch-startup-image-1136x640.png', + 'assets/apple-touch-startup-image-1242x2208.png', + 'assets/apple-touch-startup-image-1242x2688.png', + 'assets/apple-touch-startup-image-1334x750.png', + 'assets/apple-touch-startup-image-1536x2048.png', + 'assets/apple-touch-startup-image-1620x2160.png', + 'assets/apple-touch-startup-image-1668x2224.png', + 'assets/apple-touch-startup-image-1668x2388.png', + 'assets/apple-touch-startup-image-1792x828.png', + 'assets/apple-touch-startup-image-2048x1536.png', + 'assets/apple-touch-startup-image-2048x2732.png', + 'assets/apple-touch-startup-image-2160x1620.png', + 'assets/apple-touch-startup-image-2208x1242.png', + 'assets/apple-touch-startup-image-2224x1668.png', + 'assets/apple-touch-startup-image-2388x1668.png', + 'assets/apple-touch-startup-image-2436x1125.png', + 'assets/apple-touch-startup-image-2688x1242.png', + 'assets/apple-touch-startup-image-2732x2048.png', + 'assets/apple-touch-startup-image-640x1136.png', + 'assets/apple-touch-startup-image-750x1334.png', + 'assets/apple-touch-startup-image-828x1792.png', + 'assets/browserconfig.xml', + 'assets/coast-228x228.png', + 'assets/favicon-16x16.png', + 'assets/favicon-32x32.png', + 'assets/favicon-48x48.png', + 'assets/favicon.ico', + 'assets/firefox_app_128x128.png', + 'assets/firefox_app_512x512.png', + 'assets/firefox_app_60x60.png', + 'assets/manifest.json', + 'assets/manifest.webapp', + 'assets/mstile-144x144.png', + 'assets/mstile-150x150.png', + 'assets/mstile-310x150.png', + 'assets/mstile-310x310.png', + 'assets/mstile-70x70.png', + 'assets/yandex-browser-50x50.png', + 'assets/yandex-browser-manifest.json', + 'main.js', + ] + +> Snapshot 2 + + [ + { + assetName: 'assets/android-chrome-144x144.png', + content: 'png 144x144', + }, + { + assetName: 'assets/android-chrome-192x192.png', + content: 'png 192x192', + }, + { + assetName: 'assets/android-chrome-256x256.png', + content: 'png 256x256', + }, + { + assetName: 'assets/android-chrome-36x36.png', + content: 'png 36x36', + }, + { + assetName: 'assets/android-chrome-384x384.png', + content: 'png 384x384', + }, + { + assetName: 'assets/android-chrome-48x48.png', + content: 'png 48x48', + }, + { + assetName: 'assets/android-chrome-512x512.png', + content: 'png 512x512', + }, + { + assetName: 'assets/android-chrome-72x72.png', + content: 'png 72x72', + }, + { + assetName: 'assets/android-chrome-96x96.png', + content: 'png 96x96', + }, + { + assetName: 'assets/apple-touch-icon-1024x1024.png', + content: 'png 1024x1024', + }, + { + assetName: 'assets/apple-touch-icon-114x114.png', + content: 'png 114x114', + }, + { + assetName: 'assets/apple-touch-icon-120x120.png', + content: 'png 120x120', + }, + { + assetName: 'assets/apple-touch-icon-144x144.png', + content: 'png 144x144', + }, + { + assetName: 'assets/apple-touch-icon-152x152.png', + content: 'png 152x152', + }, + { + assetName: 'assets/apple-touch-icon-167x167.png', + content: 'png 167x167', + }, + { + assetName: 'assets/apple-touch-icon-180x180.png', + content: 'png 180x180', + }, + { + assetName: 'assets/apple-touch-icon-57x57.png', + content: 'png 57x57', + }, + { + assetName: 'assets/apple-touch-icon-60x60.png', + content: 'png 60x60', + }, + { + assetName: 'assets/apple-touch-icon-72x72.png', + content: 'png 72x72', + }, + { + assetName: 'assets/apple-touch-icon-76x76.png', + content: 'png 76x76', + }, + { + assetName: 'assets/apple-touch-icon-precomposed.png', + content: 'png 180x180', + }, + { + assetName: 'assets/apple-touch-icon.png', + content: 'png 180x180', + }, + { + assetName: 'assets/apple-touch-startup-image-1125x2436.png', + content: 'png 1125x2436', + }, + { + assetName: 'assets/apple-touch-startup-image-1136x640.png', + content: 'png 1136x640', + }, + { + assetName: 'assets/apple-touch-startup-image-1242x2208.png', + content: 'png 1242x2208', + }, + { + assetName: 'assets/apple-touch-startup-image-1242x2688.png', + content: 'png 1242x2688', + }, + { + assetName: 'assets/apple-touch-startup-image-1334x750.png', + content: 'png 1334x750', + }, + { + assetName: 'assets/apple-touch-startup-image-1536x2048.png', + content: 'png 1536x2048', + }, + { + assetName: 'assets/apple-touch-startup-image-1620x2160.png', + content: 'png 1620x2160', + }, + { + assetName: 'assets/apple-touch-startup-image-1668x2224.png', + content: 'png 1668x2224', + }, + { + assetName: 'assets/apple-touch-startup-image-1668x2388.png', + content: 'png 1668x2388', + }, + { + assetName: 'assets/apple-touch-startup-image-1792x828.png', + content: 'png 1792x828', + }, + { + assetName: 'assets/apple-touch-startup-image-2048x1536.png', + content: 'png 2048x1536', + }, + { + assetName: 'assets/apple-touch-startup-image-2048x2732.png', + content: 'png 2048x2732', + }, + { + assetName: 'assets/apple-touch-startup-image-2160x1620.png', + content: 'png 2160x1620', + }, + { + assetName: 'assets/apple-touch-startup-image-2208x1242.png', + content: 'png 2208x1242', + }, + { + assetName: 'assets/apple-touch-startup-image-2224x1668.png', + content: 'png 2224x1668', + }, + { + assetName: 'assets/apple-touch-startup-image-2388x1668.png', + content: 'png 2388x1668', + }, + { + assetName: 'assets/apple-touch-startup-image-2436x1125.png', + content: 'png 2436x1125', + }, + { + assetName: 'assets/apple-touch-startup-image-2688x1242.png', + content: 'png 2688x1242', + }, + { + assetName: 'assets/apple-touch-startup-image-2732x2048.png', + content: 'png 2732x2048', + }, + { + assetName: 'assets/apple-touch-startup-image-640x1136.png', + content: 'png 640x1136', + }, + { + assetName: 'assets/apple-touch-startup-image-750x1334.png', + content: 'png 750x1334', + }, + { + assetName: 'assets/apple-touch-startup-image-828x1792.png', + content: 'png 828x1792', + }, + { + assetName: 'assets/browserconfig.xml', + content: `␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + #fff␊ + ␊ + ␊ + ␊ + ␊ + ␊ + ␊ + `, + }, + { + assetName: 'assets/coast-228x228.png', + content: 'png 228x228', + }, + { + assetName: 'assets/favicon-16x16.png', + content: 'png 16x16', + }, + { + assetName: 'assets/favicon-32x32.png', + content: 'png 32x32', + }, + { + assetName: 'assets/favicon-48x48.png', + content: 'png 48x48', + }, + { + assetName: 'assets/favicon.ico', + content: 'ico 16x16', + }, + { + assetName: 'assets/firefox_app_128x128.png', + content: 'png 128x128', + }, + { + assetName: 'assets/firefox_app_512x512.png', + content: 'png 512x512', + }, + { + assetName: 'assets/firefox_app_60x60.png', + content: 'png 60x60', + }, + { + assetName: 'assets/manifest.json', + content: `{␊ + "name": "FaviconsDemo",␊ + "short_name": "FaviconsDemo",␊ + "description": "Just a demo",␊ + "dir": "auto",␊ + "lang": "en",␊ + "display": "standalone",␊ + "start_url": "/?homescreen=1",␊ + "background_color": "#fff",␊ + "theme_color": "#fff",␊ + "icons": [␊ + {␊ + "src": "android-chrome-36x36.png",␊ + "sizes": "36x36",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-48x48.png",␊ + "sizes": "48x48",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-72x72.png",␊ + "sizes": "72x72",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-96x96.png",␊ + "sizes": "96x96",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-144x144.png",␊ + "sizes": "144x144",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-192x192.png",␊ + "sizes": "192x192",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-256x256.png",␊ + "sizes": "256x256",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-384x384.png",␊ + "sizes": "384x384",␊ + "type": "image/png"␊ + },␊ + {␊ + "src": "android-chrome-512x512.png",␊ + "sizes": "512x512",␊ + "type": "image/png"␊ + }␊ + ]␊ + }`, + }, + { + assetName: 'assets/manifest.webapp', + content: `{␊ + "version": "1.0",␊ + "name": null,␊ + "description": null,␊ + "icons": {␊ + "60": "firefox_app_60x60.png",␊ + "128": "firefox_app_128x128.png",␊ + "512": "firefox_app_512x512.png"␊ + },␊ + "developer": {␊ + "name": null,␊ + "url": null␊ + }␊ + }`, + }, + { + assetName: 'assets/mstile-144x144.png', + content: 'png 144x144', + }, + { + assetName: 'assets/mstile-150x150.png', + content: 'png 150x150', + }, + { + assetName: 'assets/mstile-310x150.png', + content: 'png 310x150', + }, + { + assetName: 'assets/mstile-310x310.png', + content: 'png 310x310', + }, + { + assetName: 'assets/mstile-70x70.png', + content: 'png 70x70', + }, + { + assetName: 'assets/yandex-browser-50x50.png', + content: 'png 50x50', + }, + { + assetName: 'assets/yandex-browser-manifest.json', + content: `{␊ + "version": "1.0",␊ + "api_version": 1,␊ + "layout": {␊ + "logo": "yandex-browser-50x50.png",␊ + "color": "#fff",␊ + "show_title": true␊ + },␊ + "name": "FaviconsDemo",␊ + "short_name": "FaviconsDemo",␊ + "description": "Just a demo",␊ + "dir": "auto",␊ + "lang": "en",␊ + "display": "standalone",␊ + "background_color": "#fff",␊ + "theme_color": "#fff"␊ + }`, + }, + ] diff --git a/test/snapshots/manifest.test.js.snap b/test/snapshots/manifest.test.js.snap new file mode 100644 index 00000000..b7e87517 Binary files /dev/null and b/test/snapshots/manifest.test.js.snap differ diff --git a/test/snapshots/outputpathoption.test.js.md b/test/snapshots/outputpathoption.test.js.md index 759ddf30..05a7fd80 100644 --- a/test/snapshots/outputpathoption.test.js.md +++ b/test/snapshots/outputpathoption.test.js.md @@ -504,9 +504,6 @@ Generated by [AVA](https://ava.li). { assetName: 'test/path/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/outputpathoption.test.js.snap b/test/snapshots/outputpathoption.test.js.snap index e60c8275..982daa4b 100644 Binary files a/test/snapshots/outputpathoption.test.js.snap and b/test/snapshots/outputpathoption.test.js.snap differ diff --git a/test/snapshots/prefixed.test.js.md b/test/snapshots/prefixed.test.js.md index d2d0c614..9b5e980e 100644 --- a/test/snapshots/prefixed.test.js.md +++ b/test/snapshots/prefixed.test.js.md @@ -308,9 +308,6 @@ Generated by [AVA](https://ava.li). { assetName: 'custom/prefix/__replaced_hash_8/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ @@ -990,9 +987,6 @@ Generated by [AVA](https://ava.li). { assetName: 'custom/prefix/__replaced_hash_8/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/prefixed.test.js.snap b/test/snapshots/prefixed.test.js.snap index 1d214597..1d47a6d0 100644 Binary files a/test/snapshots/prefixed.test.js.snap and b/test/snapshots/prefixed.test.js.snap differ diff --git a/test/snapshots/publicpath.test.js.md b/test/snapshots/publicpath.test.js.md index aa9b2721..dce54ed1 100644 --- a/test/snapshots/publicpath.test.js.md +++ b/test/snapshots/publicpath.test.js.md @@ -308,9 +308,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ @@ -922,9 +919,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ @@ -1536,9 +1530,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/publicpath.test.js.snap b/test/snapshots/publicpath.test.js.snap index 46895cdc..bed123ff 100644 Binary files a/test/snapshots/publicpath.test.js.snap and b/test/snapshots/publicpath.test.js.snap differ diff --git a/test/snapshots/publicpathLight.test.js.snap b/test/snapshots/publicpathLight.test.js.snap index 366468ce..76775676 100644 Binary files a/test/snapshots/publicpathLight.test.js.snap and b/test/snapshots/publicpathLight.test.js.snap differ diff --git a/test/snapshots/publicpathoption.test.js.md b/test/snapshots/publicpathoption.test.js.md index 289462a4..fda1e603 100644 --- a/test/snapshots/publicpathoption.test.js.md +++ b/test/snapshots/publicpathoption.test.js.md @@ -308,9 +308,6 @@ Generated by [AVA](https://ava.li). { assetName: 'assets/manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/publicpathoption.test.js.snap b/test/snapshots/publicpathoption.test.js.snap index b67da298..f104ec70 100644 Binary files a/test/snapshots/publicpathoption.test.js.snap and b/test/snapshots/publicpathoption.test.js.snap differ diff --git a/test/snapshots/unprefixed.test.js.md b/test/snapshots/unprefixed.test.js.md index 7487c8e2..16f1268e 100644 --- a/test/snapshots/unprefixed.test.js.md +++ b/test/snapshots/unprefixed.test.js.md @@ -504,9 +504,6 @@ Generated by [AVA](https://ava.li). { assetName: 'manifest.json', content: `{␊ - "name": null,␊ - "short_name": null,␊ - "description": null,␊ "dir": "auto",␊ "lang": "en-US",␊ "display": "standalone",␊ diff --git a/test/snapshots/unprefixed.test.js.snap b/test/snapshots/unprefixed.test.js.snap index 70698daa..8e8e0fe1 100644 Binary files a/test/snapshots/unprefixed.test.js.snap and b/test/snapshots/unprefixed.test.js.snap differ