{"_id":"@duxet/webpack-web-app-manifest-plugin","_rev":"2-1a19cb2cd8cbb9aa0915d86956fc872d","name":"@duxet/webpack-web-app-manifest-plugin","dist-tags":{"latest":"2.2.0"},"versions":{"2.1.0":{"name":"@duxet/webpack-web-app-manifest-plugin","version":"2.1.0","description":"webpack-web-app-manifest-plugin is a webpack plugin that generates a PWA manifest and integrates with the assets JSON generated by assets-webpack-plugin.","main":"index.js","scripts":{"test":"jest","test-coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/tumblr/webpack-web-app-manifest-plugin.git"},"engines":{"node":">=8.0.0"},"keywords":["pwa","webpack","web","app","manifest"],"author":{"name":"Paul Rehkugler"},"license":"MIT","dependencies":{"jest":"^23.4.2","jest-junit":"^5.1.0","md5":"^2.2.1","webpack":"^4.29.0"},"jest":{"testMatch":["**/*.tests.js"],"collectCoverageFrom":["src/**/*.js"],"testURL":"http://localhost/","coverageDirectory":"./reports/coverage","coverageThreshold":{"global":{"branches":100,"functions":100,"lines":100,"statements":100}},"reporters":["default","jest-junit"]},"jest-junit":{"suiteName":"Jest Tests","output":"./reports/jest.xml","usePathForSuiteName":"true"},"gitHead":"bcf4e77605666371516eedbb12c47ef9c627dba7","bugs":{"url":"https://github.com/tumblr/webpack-web-app-manifest-plugin/issues"},"homepage":"https://github.com/tumblr/webpack-web-app-manifest-plugin#readme","_id":"@duxet/webpack-web-app-manifest-plugin@2.1.0","_nodeVersion":"11.10.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-pzYFQ2bdQwGIY1Sx5Fg4ggtbD8njELOarXlBDoNNS3EUacjZR1TvFlTy7kuhc30gaVIAinBhv5kjDyifP2n7sw==","shasum":"134569db6ff7af5b7c5add900e1ecce70cd2972a","tarball":"https://registry.npmjs.org/@duxet/webpack-web-app-manifest-plugin/-/webpack-web-app-manifest-plugin-2.1.0.tgz","fileCount":8,"unpackedSize":78790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbP2pCRA9TVsSAnZWagAA1N8P/2kkcV7hJhqz4oR1F7uC\nRCfj9nnRT5GuqYTi+I0tZGuvuvZ4rPoL5vjTAqhMtCPmoaCNDl2qG0GJncUA\na0wuxOZ/V9CJLsLOmPxvoe5Re78rhwfRj4E2K2GH71hMPPewvm/kWjlLQ/o/\nzOhYyxNJ18BkIwuAoLYCaGo6jRrsmiFNaINv606UBcqgC4u1dnuuAGO9QU5M\npcPSuOgo5iJ+J1jSgBIRX1qror490YibHadR9E859MnLD6VLi63pvmOaIqpj\nLAzyUojuQz0FjCdhivIaE5ytOKzk/1NTbTo/ZjcAlILZB7GijX+Hz6XpmNue\nSJw2RxwuDJiycc8T+jZxK319DKw/TxJRFq04aWCUw7BLc8LaS156+x+8hZMy\nWaLma4VQSsUsuS2Fgx6MzumEHdJxWCH3XjbDSYSgmJfJJrJ5HdS+iQQi6Hf7\nbGEBtlr0Bx+9l/S/0tkzFX9ePEOOkJwkjlvd7zBQJVCw3sfT6ZmBL6eco90O\n6+QZPo+gkmF8qJ0hXW6XQCfhkctUHn9ogeTixR6BdtfoA4pV8e104XLzsrxC\n2xo2RqoJ0YpSCNIWm65N7nq5Zv4q4YDcDlnxriO5Q8O0tN+oNPkJLb3BdoQz\no8OLIJ2JdHsyQICJTAgk8nBwG3mPFCVpKuebqrunb+ND5r+cKllWl988AsV0\nbYlb\r\n=kDfn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuheIJUghstBvNUV/oaSHXcWvhZm3AVGMMnNaoPR6s7QIhAI0lrS2WyR8rkQAqeWy5PVSfeZPbRBkVZLuTEQQfm0jm"}]},"maintainers":[{"name":"duxet","email":"duxetlg@gmail.com"}],"_npmUser":{"name":"duxet","email":"duxetlg@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-web-app-manifest-plugin_2.1.0_1550646696264_0.580755889274956"},"_hasShrinkwrap":false},"2.2.0":{"name":"@duxet/webpack-web-app-manifest-plugin","version":"2.2.0","description":"webpack-web-app-manifest-plugin is a webpack plugin that generates a PWA manifest and integrates with the assets JSON generated by assets-webpack-plugin.","main":"index.js","scripts":{"test":"jest","test-coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/tumblr/webpack-web-app-manifest-plugin.git"},"engines":{"node":">=8.0.0"},"keywords":["pwa","webpack","web","app","manifest"],"author":{"name":"Paul Rehkugler"},"license":"MIT","dependencies":{"jest":"^23.4.2","jest-junit":"^5.1.0","md5":"^2.2.1","webpack":"^4.29.0"},"jest":{"testMatch":["**/*.tests.js"],"collectCoverageFrom":["src/**/*.js"],"testURL":"http://localhost/","coverageDirectory":"./reports/coverage","coverageThreshold":{"global":{"branches":100,"functions":100,"lines":100,"statements":100}},"reporters":["default","jest-junit"]},"jest-junit":{"suiteName":"Jest Tests","output":"./reports/jest.xml","usePathForSuiteName":"true"},"gitHead":"65a8b62e2d90f75fbb3ddb7687d67fad263289b9","bugs":{"url":"https://github.com/tumblr/webpack-web-app-manifest-plugin/issues"},"homepage":"https://github.com/tumblr/webpack-web-app-manifest-plugin#readme","_id":"@duxet/webpack-web-app-manifest-plugin@2.2.0","_nodeVersion":"11.10.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-1ivI0S9tLfWyz73xpCJx9Zi2y5sSrH37I0uGxFWz/9/9vy1tXKo02YKEudF1LfRCYmYyUSzm+pjVsD0NUdnz7w==","shasum":"5b335c27e720036e11f2a6361f828e1cbaac02d5","tarball":"https://registry.npmjs.org/@duxet/webpack-web-app-manifest-plugin/-/webpack-web-app-manifest-plugin-2.2.0.tgz","fileCount":8,"unpackedSize":78856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbQCfCRA9TVsSAnZWagAA2tsP/3Fhxu/ag46Te5olX0n/\nKDhL6QUTdcu27XaUSWMqK1U16sEDgnp6zTzfNfcS5aTfkPUYJP+Ahjmx0Ske\namGLYhgWBrYAZsb6+FFoJwxRd0N+herie2iELI3e/KZILgvCLwd+8ZqeB+rh\nP+Lq/0nvVGPmaDyk3jzGAiJ3m81tIfV6ZQTA4LCW6Dkyh9TnTl/W+WXqVBAB\nZ4crh9rXCLLNXxwRedkLDpjEwD2Euayksag+crggl675wGIkj7pkz5tTcrvf\npiViEJIsorPwKPegw6m/inLx2MvGMGv0iP/hHrirpfsoDIoHsROWWgJnKLkf\nO/boWdG3jfNxQKZ2KeYXMjXviHbkTSuvUIRSxpQsfC8m2t84S8wD/eP6t26n\nJoDpu8ZrticFSlMJGEnMtTFnrHm7CFuxkherPcis3pAMHPgpkwA20u+9THMM\nXknnxE5HoWKzs50ZpKB8Tpb0i97kE7GoRXZW2K/PJyp1PVVc0nbBRMrChnu7\na+uI4TR+zwj73j6XFEdu8t8RkhNW5/S55APqjMI/pFfssvJfCHKHs6Px/wJb\njwRcrPj26XG6s15ILmrs1xlb/gl8FmeLcF5KA6e9s9BH6J8AXugBm6f+Zuk+\nFN+tZMayJWeaeeEjU7exiLC8uNMfjM8mKxi+P8wDw9LaRu9Qx+sYGX+RJ2lw\nZ+6Q\r\n=0mbQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBwo3SjId4Oo6Sm/OYTerwSKUd4Szr/K98gHb47JSl5wIgdJu+cnsN+u744pPp2FN+2+GmMq7mik45MoA34gdxr1o="}]},"maintainers":[{"name":"duxet","email":"duxetlg@gmail.com"}],"_npmUser":{"name":"duxet","email":"duxetlg@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-web-app-manifest-plugin_2.2.0_1550647454800_0.5582478060402942"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-20T07:11:36.086Z","2.1.0":"2019-02-20T07:11:36.445Z","modified":"2022-04-05T06:09:41.598Z","2.2.0":"2019-02-20T07:24:14.938Z"},"maintainers":[{"name":"duxet","email":"duxetlg@gmail.com"}],"description":"webpack-web-app-manifest-plugin is a webpack plugin that generates a PWA manifest and integrates with the assets JSON generated by assets-webpack-plugin.","homepage":"https://github.com/tumblr/webpack-web-app-manifest-plugin#readme","keywords":["pwa","webpack","web","app","manifest"],"repository":{"type":"git","url":"git+https://github.com/tumblr/webpack-web-app-manifest-plugin.git"},"author":{"name":"Paul Rehkugler"},"bugs":{"url":"https://github.com/tumblr/webpack-web-app-manifest-plugin/issues"},"license":"MIT","readme":"![webpack-web-app-manifest-plugin logo](/assets/logo.gif)\n\n# webpack-web-app-manifest-plugin\n\n`webpack-web-app-manifest-plugin` is a webpack plugin that generates a PWA manifest and integrates with the assets JSON generated by [assets-webpack-plugin](https://github.com/ztoben/assets-webpack-plugin).\n\n# How to install it\n\n```\nnpm install --save-dev webpack-web-app-manifest-plugin\n```\n\nor\n\n```\nyarn add webpack-web-app-manifest-plugin --dev\n```\n\n# Using it the easy way\n\nName all of your icon files `manifest/icon_[square dimension].(png|jpeg|jpg)`. If you have a different naming scheme for your files, check out the section [Using it the hard way](#using-it-the-hard-way) below.\n\nIn your webpack config file:\n\n```js\nimport AppManifestPlugin from 'webpack-web-app-manifest-plugin';\n\n...\n\nplugins: [\n  new AppManifestPlugin({\n    content: {\n      name: 'Tumblr',\n      short_name: 'Tumblr',\n      background_color: '#36465d',\n    },\n    destination: '/manifest',\n  }),\n],\n\n...\n```\n\nTo access the app manifest file path from your asset manifest:\n\n```jsx\nconst manifest = // however you usually access your asset manifest in code\nconst appManifestPath = manifest['app-manifest'].json;\n\n...\n\n<link rel=\"manifest\" href={appManifestPath} />\n```\n\n# Using it the hard way\n\nIf you don't want to name your icons based on our naming scheme, you will want to implement a few functions that are passed into the plugin.\n\n## `isAssetManifestIcon()`\n\n`isAssetManifestIcon` is a function to determine if a webpack asset should be included as an icon in the web app manifest. The function accepts a `filename` parameter and returns true or false.\n\nFor example, if you only wanted to include a specific list of files, you could implement it like this:\n\n```js\nplugins: [\n  new AppManifestPlugin({\n    ...\n    isAssetManifestIcon: (fileName) => ['myIcon1.png', 'myIcon2.png'].indexOf(fileName) >= 0,\n  }),\n],\n```\n\n## `getIconSize()`\n\n`getIconSize` is a function to determine the icon size of any asset that passes the check `isAssetManifestIcon()`. The function accepts a `fileName` parameter and returns an object `{ width, height }`.\n\nFor example, if you wanted to hardcode a list of sizes for your icons, you could implement it like this:\n\n```js\nconst iconSizes = {\n  'myIcon1.png': { width: 120, height: 120},\n  'myIcon2.png': { width: 80, height: 80},\n};\n\n...\n\nplugins: [\n  new AppManifestPlugin({\n    ...\n    getIconSize: (fileName) => iconSizes[fileName],\n  }),\n],\n```\n\n## `getIconType()`\n\n`getIconType` is a function to determine the type of any asset that passes the check `isAssetManifestIcon()`. The function accepts a `fileName` parameter and returns a string describing the mime type of the asset, ex. \"image/png\".\n\nFor example, if you wanted to hardcode a list of mime types for your icons, you could implement it like this:\n\n```js\nconst iconTypes = { 'myIcon1.png': 'image/png', 'myIcon2.jpg': 'image/jpeg' };\n\n...\n\nplugins: [\n  new AppManifestPlugin({\n    ...\n    getIconType: (fileName) => iconTypes[fileName],\n  }),\n],\n```\n","readmeFilename":"README.md"}