From db677fc8d054e2307d85ae5e45f4803ae1de34dd Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Fri, 29 Jan 2021 14:53:49 +0100 Subject: [PATCH] feat: generate custom manifest in light mode --- package.json | 2 +- src/cache.js | 10 +++- src/index.js | 53 ++++++++++++++---- test/manifest.light.file.test.js | 29 ++++++++++ test/manifest.light.test.js | 39 +++++++++++++ test/snapshots/html.false.test.js.snap | Bin 3851 -> 3851 bytes test/snapshots/manifest.light.file.test.js.md | 42 ++++++++++++++ .../manifest.light.file.test.js.snap | Bin 0 -> 465 bytes test/snapshots/manifest.light.test.js.md | 42 ++++++++++++++ test/snapshots/manifest.light.test.js.snap | Bin 0 -> 452 bytes test/snapshots/publicpath.test.js.snap | Bin 5180 -> 5262 bytes test/snapshots/publicpathLight.test.js.snap | Bin 491 -> 491 bytes 12 files changed, 203 insertions(+), 14 deletions(-) create mode 100644 test/manifest.light.file.test.js create mode 100644 test/manifest.light.test.js create mode 100644 test/snapshots/manifest.light.file.test.js.md create mode 100644 test/snapshots/manifest.light.file.test.js.snap create mode 100644 test/snapshots/manifest.light.test.js.md create mode 100644 test/snapshots/manifest.light.test.js.snap diff --git a/package.json b/package.json index 89b435dd..435fb010 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "favicons-webpack-plugin", - "version": "5.0.0-alpha.12", + "version": "5.0.0-alpha.13", "description": "Let webpack generate all your favicons and icons for you", "main": "src/index.js", "files": [ diff --git a/src/cache.js b/src/cache.js index 1a0a2477..c5ac7d34 100644 --- a/src/cache.js +++ b/src/cache.js @@ -20,7 +20,7 @@ const faviconCache = new WeakMap(); * * @template TResult * - * @param {string[]} absoluteFilePaths - file paths used used by the generator + * @param {string[]} absoluteFilePaths - file paths used used by the generator * @param {any} pluginInstance - the plugin instance to use as cache key * @param {boolean} useWebpackCache - Support webpack built in cache * @param {WebpackCompilation} compilation - the current webpack compilation @@ -81,7 +81,13 @@ function runCached( // Start generating the favicons const faviconsGenerationsPromise = useWebpackCache - ? runWithFileCache(absoluteFilePaths, compilation, idGenerator, eTags, generator) + ? runWithFileCache( + absoluteFilePaths, + compilation, + idGenerator, + eTags, + generator + ) : readFiles(absoluteFilePaths, compilation).then(fileContents => generator(fileContents, idGenerator(fileContents)) ); diff --git a/src/index.js b/src/index.js index 2fccc530..c1371383 100644 --- a/src/index.js +++ b/src/index.js @@ -82,7 +82,10 @@ class FaviconsWebpackPlugin { } if (typeof this.options.manifest === 'string') { - this.options.manifest = path.resolve(compiler.context, this.options.manifest); + this.options.manifest = path.resolve( + compiler.context, + this.options.manifest + ); } // Hook into the webpack compilation @@ -273,16 +276,22 @@ class FaviconsWebpackPlugin { * Generate the favicons * * @param {{content: Buffer | string, hash: string}} logo - * @param {Buffer | string} manifest + * @param {Buffer | string} baseManifest - the content of the file from options.manifest * @param {import('webpack').Compilation} compilation * @param {string} outputPath */ - generateFavicons(logo, manifest, compilation, outputPath) { + generateFavicons(logo, baseManifest, compilation, outputPath) { const resolvedPublicPath = getResolvedPublicPath( logo.hash, compilation, this.options ); + /** @type {{[key: string]: any}} - the parsed manifest from options.manifest */ + const parsedBaseManifest = + typeof this.options.manifest === 'string' + ? JSON.parse(baseManifest.toString() || '{}') + : this.options.manifest || {}; + switch (this.getCurrentCompilationMode(compilation.compiler)) { case 'light': if (!this.options.mode) { @@ -293,6 +302,7 @@ class FaviconsWebpackPlugin { return this.generateFaviconsLight( logo.content, + parsedBaseManifest, compilation, resolvedPublicPath, outputPath @@ -303,7 +313,7 @@ class FaviconsWebpackPlugin { return this.generateFaviconsWebapp( logo.content, - manifest ? JSON.parse(manifest.toString()) : this.options.manifest, + parsedBaseManifest, compilation, resolvedPublicPath, outputPath @@ -317,12 +327,14 @@ class FaviconsWebpackPlugin { * it is the default mode for development * * @param {Buffer | string} logoSource + * @param {{[key: string]: any}} baseManifest * @param {import('webpack').Compilation} compilation * @param {string} resolvedPublicPath * @param {string} outputPath */ async generateFaviconsLight( logoSource, + baseManifest, compilation, resolvedPublicPath, outputPath @@ -331,15 +343,34 @@ class FaviconsWebpackPlugin { const faviconName = `favicon${faviconExt}`; const RawSource = compilation.compiler.webpack.sources.RawSource; + const tags = [``]; + const assets = [ + { + name: path.join(outputPath, faviconName), + contents: new RawSource(logoSource, false) + } + ]; + + // If the manifest is not empty add it also to the light mode + if (Object.keys(baseManifest).length > 0) { + tags.push(''); + assets.push({ + name: path.join(outputPath, 'manifest.json'), + contents: new RawSource( + JSON.stringify(mergeManifests(baseManifest, { + icons: [{ + src: faviconName + }] + }), null, 2), + false + ) + }); + } + return { publicPath: resolvedPublicPath, - assets: [ - { - name: path.join(outputPath, faviconName), - contents: new RawSource(logoSource, false) - } - ], - tags: [``] + assets, + tags }; } diff --git a/test/manifest.light.file.test.js b/test/manifest.light.file.test.js new file mode 100644 index 00000000..52cbea96 --- /dev/null +++ b/test/manifest.light.file.test.js @@ -0,0 +1,29 @@ +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, + mode: 'light', + manifest: path.resolve(__dirname, './fixtures/manifest.json') + }) + ] + }); + + snapshotCompilationAssets(t, compilationStats); +}); + +test.afterEach(t => fs.remove(t.context.root)); diff --git a/test/manifest.light.test.js b/test/manifest.light.test.js new file mode 100644 index 00000000..3276e3b8 --- /dev/null +++ b/test/manifest.light.test.js @@ -0,0 +1,39 @@ +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, + mode: 'light', + 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/html.false.test.js.snap b/test/snapshots/html.false.test.js.snap index dfbcee80ca1438af6e1f7cdd2fbccc8ea2ff56ba..b9a897cff18311af44926c822a0b3b3789de4816 100644 GIT binary patch delta 104 zcmV-u0GI!Z9*Z6#K~_N^Q*L2!b7*gLAa*he0sz&Ts#o32j#uwV2c~vb)2fjorZ6pT z`0V~|Z(n!8$6q@z(iHz;dx_Y3{G6NuhZw7gf9t6S@BdQEB@3?Han-8leq6Em3l0cJ K*g&fs#Q*?(M=-Gf delta 104 zcmV-u0GI!Z9*Z6#K~_N^Q*L2!b7*gLAa*he0ss!;Z&;aF&X!H)9~Bp9esGZ@rZCmS zzxC9E_kXG7k_A`pxN6mNKQ0klkDrrM;1FYr8$P>#+uPS&@bT9Uj5Ni6*j};t3l0dP KALjNP#Q*>Y7%zAL diff --git a/test/snapshots/manifest.light.file.test.js.md b/test/snapshots/manifest.light.file.test.js.md new file mode 100644 index 00000000..de58cf46 --- /dev/null +++ b/test/snapshots/manifest.light.file.test.js.md @@ -0,0 +1,42 @@ +# Snapshot report for `test/manifest.light.file.test.js` + +The actual snapshot is saved in `manifest.light.file.test.js.snap`. + +Generated by [AVA](https://ava.li). + +## should generate a result with custom manifest values + +> Snapshot 1 + + [ + 'assets/favicon.png', + 'assets/manifest.json', + 'main.js', + ] + +> Snapshot 2 + + [ + { + assetName: 'assets/favicon.png', + content: 'png 874x989', + }, + { + assetName: 'assets/manifest.json', + content: `{␊ + "name": "FaviconsDemo",␊ + "short_name": "FaviconsDemo",␊ + "description": "A manifest used for unit-testing",␊ + "dir": "auto",␊ + "lang": "en",␊ + "display": "standalone",␊ + "background_color": "#fff",␊ + "theme_color": "#fff",␊ + "icons": [␊ + {␊ + "src": "favicon.png"␊ + }␊ + ]␊ + }`, + }, + ] diff --git a/test/snapshots/manifest.light.file.test.js.snap b/test/snapshots/manifest.light.file.test.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..1d4f6ffa6c6ab77d9b57af3497843cef797865b7 GIT binary patch literal 465 zcmV;?0WSVQRzVS2}Np^-10_5S~b^URB_vvNtaO~##Y{?_$yUlFUC&VXt zn}Y%9TSi|&J4U-g8;9H|^lzpqy8v)eu~;NfAm9@iM#3W#ChQ-DF{TvPY9V5sIFw?( zC2AQ0;FyVwNtlQuuJn9EN#Q8ZQTc?$0;LbL`HSdR&^G>>%OfxZu-iL`QO9_&HSRFH zM|*ZPa{H$Z9%}I3!&0ea(HsymjJ5?|Q2#SJVjC9C{BHU|d&fPN@Lyl%)0sS`H5c0L zhY+FV)#dZG^4dR}{P48DwehClvOsAduuM>)!A@^JwapV5%o;`2WvWkp)~j5FY24DW z6b9I&t~+fjUZs&tX}`|w`^D|K-_E_B}jhJbGj HL<0Z-hS}S5 literal 0 HcmV?d00001 diff --git a/test/snapshots/manifest.light.test.js.md b/test/snapshots/manifest.light.test.js.md new file mode 100644 index 00000000..09c350a2 --- /dev/null +++ b/test/snapshots/manifest.light.test.js.md @@ -0,0 +1,42 @@ +# Snapshot report for `test/manifest.light.test.js` + +The actual snapshot is saved in `manifest.light.test.js.snap`. + +Generated by [AVA](https://ava.li). + +## should generate a result with custom manifest values + +> Snapshot 1 + + [ + 'assets/favicon.png', + 'assets/manifest.json', + 'main.js', + ] + +> Snapshot 2 + + [ + { + assetName: 'assets/favicon.png', + content: 'png 874x989', + }, + { + assetName: 'assets/manifest.json', + content: `{␊ + "name": "FaviconsDemo",␊ + "short_name": "FaviconsDemo",␊ + "description": "Just a demo",␊ + "dir": "auto",␊ + "lang": "en",␊ + "display": "standalone",␊ + "background_color": "#fff",␊ + "theme_color": "#fff",␊ + "icons": [␊ + {␊ + "src": "favicon.png"␊ + }␊ + ]␊ + }`, + }, + ] diff --git a/test/snapshots/manifest.light.test.js.snap b/test/snapshots/manifest.light.test.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..aacb2858caa81b81f5730a6990f909f2cf757463 GIT binary patch literal 452 zcmV;#0XzOdRzVmQ2<00000000Ax zQAlzFL<@f zTSE&#>X{yTV#>pSNmcDg!Bdx&x^giMIZB^qvllQfBR2k;%OX$&*c}|i>`X^6HSRFI zM?9xBvipq=^A%X{X}MfB)+`WGLTte|tNqnFVH!Gm{&f0rbH_azvym_J{PMJ;+E{tGEV!=6v5dFodfS8fWSzyro70MHi$tCLt~Z(Vld!8o z!L?zhCzVUx=7%08nx{QABqGXNnqfRO$ZkY0G$j?~O&ST#22z9ir>#Wvc=N;;kuZg3 uf*=^Es?B2dlVB!9>IgTkdudjElf>7)Prtx3QXkjjLjMhRq;VuK0{{T6yvM`< literal 0 HcmV?d00001 diff --git a/test/snapshots/publicpath.test.js.snap b/test/snapshots/publicpath.test.js.snap index bed123ff798144724d099932ce0e79d5998c860b..b0145d7ec8859573ea9475989ec10eb7bc487039 100644 GIT binary patch literal 5262 zcmZ{ddpr~V|HU^m_nBL+L++PcV{!?(_aO`sxir^U%>8~{hzMcC++#6RBDt)XTjiEZ zljNFMnrk6K{Ho9A`}q7Gzsvit^FFV0&Qs4$@3altH6YmAKjd`SStc65f_%r2@S-sD zxQ2)2cr)_0a5@9v&jYPHGy96YigYpE8($Tl{SvaNCA1tpWnxt&o|A*m&HaEDq-Euw z23kwCBFLqN!baob%atf~z191vkRCLLmW4pIaU!oWhd6^Z@9mEd&>zJ^?>=RPO=Ggd z*VHCo20HT$H{W*ODVlN)48KLx8gwp|aAVzHyGESvJQ-SBTVwew)%pCsbjd)9u({Jk z;lr-My?M5Smk&*(_ClqX<{{JYqc9gMrp}|z>XYMc!l%jOFJk^jRH@D9ghZhi$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ebea93c..383060348235a0f732fdcb98e0efb458882b432d 100644 GIT binary patch delta 249 zcmV!?!Hh=>RZXRs7(ieW6xRZ|d9Qz-*!Mz5-K}ZqpSSmY zLYcs#{E=b&e@P5nHi{|v$t9HqsR|(Vc3d_PNTF6#F02`e-{|g_B2mk;8 z00003%VA((U}ngB{qw}W7dq;0O-uj0z3&ss!~g=5ptu0Y?O0*-!b0u#lPSTBM+;R= zrI^5?Op#&ye^v%A8^x6T$sCB8bEBtHI>)ZBdip^*Y@hfE5@3{||zu!Bm;4^U5!(!>V<0wY?Q)&~FpSM6+C