{"_id":"@adelfattakhova/manifest-revision-webpack-plugin","_rev":"2-71fecd0896b4902839d90c4e810e4c3c","name":"@adelfattakhova/manifest-revision-webpack-plugin","dist-tags":{"latest":"0.5.2"},"versions":{"0.5.0":{"name":"@adelfattakhova/manifest-revision-webpack-plugin","version":"0.5.0","description":"Create a slimmed down manifest of your chunks and assets so that you can cache all of your assets.","main":"index.js","scripts":{"test":"node tests/formatTest"},"repository":{"type":"git","url":"git+https://github.com/AdelFattakhova/manifest-revision-webpack-plugin.git"},"keywords":["webpack","stats","manifest","revision"],"author":{"name":"Nick Janetakis","email":"nick.janetakis@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/nickjj/manifest-revision-webpack-plugin/issues"},"homepage":"https://github.com/nickjj/manifest-revision-webpack-plugin","dependencies":{"walk":"^2.3.9"},"peerDependencies":{"sync-exec":"^0.6.2","webpack":"^1.8.11 || ^2.2.0 || ^3.3.0 || ^4.0.0"},"directories":{"test":"tests"},"devDependencies":{},"gitHead":"6167366bac43a2f63ddee68318a6a6af1e9815d5","_id":"@adelfattakhova/manifest-revision-webpack-plugin@0.5.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-RekVDUVg0e+4VhN41dwLeWzIATfh2Z3o+4E5Glin3jNQ+J2GOwERTt/PdYYoQsaZgq4j6KVddm00lgpVW6vHbA==","shasum":"9a839ff78763ecc9867e8c404084b21a46078623","tarball":"https://registry.npmjs.org/@adelfattakhova/manifest-revision-webpack-plugin/-/manifest-revision-webpack-plugin-0.5.0.tgz","fileCount":10,"unpackedSize":51656,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7xNUupE2o0AGZhhnxpeIZuee+AHVAD0ZwNQEsfngsjAiApBwBleB2UOCPwYBQrvuJSrFWCWddF6j3uqDcsa51MiA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIty0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJsQ/9H8BGoBOt0JrnzaqXg/ZAQBNHHwmbN55f4uxeLo6lLpBAwDwz\r\n9cWYlyx+2EMD1GRLmiGWx+dCs8UKKKgaaImtk6MNfgmAwdNvitJrhawwbATW\r\nVTkHlRc1JoaQOKA1wV7X5bQxL5ejv823C9zLtdmAo2MTcW44HLia38WKniWh\r\n+19Owur6QVHnZdNbVQGFEY5B5kTUn7iRUGNM3DWs2s9JruO4WnbYkajwyfry\r\ndbCUFfyjjXJXrmnRBHYuiXVTSEeolLcr+9mnFdSzj6Q6M3JG6kqOhE0wiasW\r\n4NsnCsMEAXv3Y1ehm/QoPpC2NwKVN6VQ3fKlcJALgta5FABxhtQLerxA+HgM\r\n7AGO2LaFv0n7afa3+b43y4jQzlht2t9Xx/VNoXgHtW4CkFmFWdMW0i+y3nDa\r\nxnQFbU2pDcow1+R9lbTYfy232RklvSth+K1KPKCrzW+AUJTVOjTPGICFzBvL\r\n1TQ6Nf+QxKpJ4Me0zDgIWoaGB1Y+4/x9ncUpQf1thQWOgAvtg6ubPiJOx1lu\r\no9E15qeBCEjiyn3KxueIbK0mN3q6djGXd87Y6AYUS0CEl0PW3XeTrkzZULKR\r\n8KUHBeuY68mLy07wxdC7d2sWizdYlbBTh99esFJ0pUyljyEiuw7q4PTxGHb/\r\nCDpYrkRmR5iMEDoGynugAdvHoyE5ShmmHdw=\r\n=f94Z\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"adelfattakhova","email":"adelfattakhova@rambler.ru"},"maintainers":[{"name":"adelfattakhova","email":"adelfattakhova@rambler.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/manifest-revision-webpack-plugin_0.5.0_1680006324004_0.6226914620000772"},"_hasShrinkwrap":false},"0.5.1":{"name":"@adelfattakhova/manifest-revision-webpack-plugin","version":"0.5.1","description":"Create a slimmed down manifest of your chunks and assets so that you can cache all of your assets.","main":"index.js","scripts":{"test":"node tests/formatTest"},"repository":{"type":"git","url":"git+https://github.com/AdelFattakhova/manifest-revision-webpack-plugin.git"},"keywords":["webpack","stats","manifest","revision"],"author":{"name":"Nick Janetakis","email":"nick.janetakis@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/nickjj/manifest-revision-webpack-plugin/issues"},"homepage":"https://github.com/nickjj/manifest-revision-webpack-plugin","dependencies":{"walk":"^2.3.9"},"peerDependencies":{"sync-exec":"^0.6.2","webpack":"^1.8.11 || ^2.2.0 || ^3.3.0 || ^4.0.0 || ^5.0.0"},"directories":{"test":"tests"},"devDependencies":{},"gitHead":"bb4e7edc59e9c8a303d2a9101dd217f5687e70c7","_id":"@adelfattakhova/manifest-revision-webpack-plugin@0.5.1","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-PwZxYUWlFEt2XBCSkDe+X7xV+TWdmurOdXizTCfboh1rsELc3fyezMBNX3iaTGyiYMhfR55MbQWXhrQ4N5zjcw==","shasum":"82b66ecb94c822604a9fa208fa347d4e1472e161","tarball":"https://registry.npmjs.org/@adelfattakhova/manifest-revision-webpack-plugin/-/manifest-revision-webpack-plugin-0.5.1.tgz","fileCount":10,"unpackedSize":51726,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPc5T+jqc5TaeQPUAMBfJX2iJYbBsM6LAPpia7ifzLjgIhALeZgMZ4tD5qlI2VsWAEb3GbsKor0yfQrdlAJvwTMpRA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJX/RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9wRAAgZ4saKtxAlAVdtTyVkded+9M6JNn0ZK+DQciO8w30tHTLlst\r\nNCcNpSIpTPHxaBSqwqWBsVKxLxoYjHbqW8hypTI47flTm+UlCUGDqd0grAyN\r\nGkQs74c8qMNDDFEVgvNM+daGTqrgxMO99wj5E8rRY0vOLNjKIqMEaGcndL3D\r\n3QIgqOz8C+Yx2MvRwP+C1f6D4uhzWEfO8NlNG2dKFQ0af+QFyS0Rlll7Z0yC\r\nV1ObSPMFEAxufNVol9cKz9K7HCQrObA7bT9k0d3MbBOSEjx7CCmLWxJa/ERO\r\nvPGsUFRx6ku3N70K5N8mNVo/PUJA7pnU0TjxoK1Sq3wDmP3hwFNWDQqNVofi\r\nlHIi1VCNKjxpL+TeEgPCW++RebOr+WBNgdPsLseSFb/aY54AE3JytHznVoz1\r\nBUHf06cVW+TCPDvKh9U4taWDkjqLCQYiQuKl/3EtpVCntMIOGOuOfD+If9Nz\r\nWH/pnTpL45RqUYs5Sq1pkQl0XcvD4BbvnuqKKYGjloo5qHCFki5kV6a3GW1v\r\nqcgkzcBPH5okgwPi/nVxGqyGwwNT0kSQIPlFEM4pExYIzlOgixFBrUv/uSpZ\r\nDtM9J0NMDIjqAYZF0fsxRl2f+D7lVDNiNDwgKm9omxwkcknBWYPc1Z/xRvRO\r\nMUfa1TwDCGuGHJt+pMCUcwU6BROciOi5UuU=\r\n=+Gvl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"adelfattakhova","email":"adelfattakhova@rambler.ru"},"maintainers":[{"name":"adelfattakhova","email":"adelfattakhova@rambler.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/manifest-revision-webpack-plugin_0.5.1_1680179152973_0.7435240938673164"},"_hasShrinkwrap":false},"0.5.2":{"name":"@adelfattakhova/manifest-revision-webpack-plugin","version":"0.5.2","description":"Create a slimmed down manifest of your chunks and assets so that you can cache all of your assets.","main":"index.js","scripts":{"test":"node tests/formatTest"},"repository":{"type":"git","url":"git+https://github.com/AdelFattakhova/manifest-revision-webpack-plugin.git"},"keywords":["webpack","stats","manifest","revision"],"author":{"name":"Nick Janetakis","email":"nick.janetakis@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/nickjj/manifest-revision-webpack-plugin/issues"},"homepage":"https://github.com/nickjj/manifest-revision-webpack-plugin","dependencies":{"walk":"^2.3.9"},"peerDependencies":{"sync-exec":"^0.6.2","webpack":"^1.8.11 || ^2.2.0 || ^3.3.0 || ^4.0.0 || ^5.0.0"},"directories":{"test":"tests"},"devDependencies":{},"gitHead":"787cba5452552035463b4085fa9de2a0d8087354","_id":"@adelfattakhova/manifest-revision-webpack-plugin@0.5.2","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-JUC6vQzvsPRr+FEDu9sfBRGUjFAksZ/dyZ01Z02St9WOio/Q5vXZK2R2fXWBBwYboq3OY+LtkOe9nZbOkdLzWA==","shasum":"13d4d8626da6deb987dd9794e7ef93c2abbc4db6","tarball":"https://registry.npmjs.org/@adelfattakhova/manifest-revision-webpack-plugin/-/manifest-revision-webpack-plugin-0.5.2.tgz","fileCount":10,"unpackedSize":51898,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLQ9mO1YQthIiOWBaMNMc7TWvQ8DYNdJOc/2hZ0u+F7gIhAOpzUuknABc0f6hM391381LkZ5cGxPBy4cindycrv4fV"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKqJWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRMQ/+K5khWfrMr5MU7GJ4wyev1gJjvBFf0FTOAcDL9jjYk902R4SK\r\nwuU0ZplMzxgxJ6ud7vkhrdHBiSnsgRR55Tlrwuy2SEw9FkBHQAQbHdHkIB9r\r\nycR4NNGPSiVRcaujHeirqC2VGhvgU2NBzMgtxvnSzDJCnxjSzhszZBrC8HYJ\r\nnViSpZP4WmYZtkDIw0yQiXFVstmGYd2l8bZq3H8wnhVDl0xXeoSNtM3r5eHV\r\nDZPRCMhUExh7bJ1gD8HRw6yVCKRnXLuu6UtlYiyxwN/4vezfcwEBzBUItOut\r\nj1YEKFUqsGUJxRP35SR92KDwxmuuG7ODd0D3/9iqlepjOYPZ28rAlRiwFPDO\r\nzjBomWJSi3+iVxZM2l63jtqBI/XY6A6rzyDiyTxxkHRiA0tL2rChBy3rb3B5\r\ng0XppsQYVzgrnQVrQFDjCOr5pngcux4uZXu9rY7/8erwkdEHUm8oot6OKwV7\r\nPfRWR5rvDEJAEqTVOpoaN+Mi2MwaFe4pO7+Jg4PydWM1zW7sOprn1E8dN18K\r\n8mRG0TPUaPiwDlSG/n0T+nHJOuHMy05+IZaGlqhHd6p7dgly0pEGtM1xXpkv\r\nTNf6eeLm4GcR1Ss30s5OvMS/fRWRinJ7IRmnItC4P+W9zzEgGNyYOXM1LZ0Y\r\nGVME/4bqiZQsZd0hXo+bVh2RBcd7tRNdTqM=\r\n=5zO6\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"adelfattakhova","email":"adelfattakhova@rambler.ru"},"maintainers":[{"name":"adelfattakhova","email":"adelfattakhova@rambler.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/manifest-revision-webpack-plugin_0.5.2_1680515670354_0.19306121188290537"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-28T12:25:23.932Z","0.5.0":"2023-03-28T12:25:24.203Z","modified":"2023-04-03T09:54:30.632Z","0.5.1":"2023-03-30T12:25:53.179Z","0.5.2":"2023-04-03T09:54:30.515Z"},"maintainers":[{"name":"adelfattakhova","email":"adelfattakhova@rambler.ru"}],"description":"Create a slimmed down manifest of your chunks and assets so that you can cache all of your assets.","homepage":"https://github.com/nickjj/manifest-revision-webpack-plugin","keywords":["webpack","stats","manifest","revision"],"repository":{"type":"git","url":"git+https://github.com/AdelFattakhova/manifest-revision-webpack-plugin.git"},"author":{"name":"Nick Janetakis","email":"nick.janetakis@gmail.com"},"bugs":{"url":"https://github.com/nickjj/manifest-revision-webpack-plugin/issues"},"license":"ISC","readme":"[![Build Status](https://secure.travis-ci.org/nickjj/manifest-revision-webpack-plugin.png)](http://travis-ci.org/nickjj/manifest-revision-webpack-plugin)\n\n## Manifest revision plugin for webpack\n\nWouldn't it be neat if you could just supply a directory path, install a plugin\nand now magically all of the assets found were automatically auto-tagged with\ntheir md5 value so you can cache them forever?\n\nThat's what this plugin does. For example, here's a manifest file that it output:\n\n```json\n{\n  \"publicPath\": \"http://localhost:2992/assets/\",\n  \"assets\": {\n    \"images/hamburger.svg\": \"images/hamburger.d2cb0dda3e8313b990e8dcf5e25d2d0f.svg\",\n    \"images/spinner.gif\": \"images/spinner.37348967baeae34bfa408c1f16794db1.gif\",\n    \"images/touch/apple-touch-icon.png\": \"images/touch/apple-touch-icon.7326f54bfe6776293f08b34c3a5fde7b.png\",\n    \"images/touch/chrome-touch-icon-192x192.png\": \"images/touch/chrome-touch-icon-192x192.571f134f59f14a6d298ddd66c015b293.png\",\n    \"images/touch/icon-128x128.png\": \"images/touch/icon-128x128.7c46d686765c49b813ac5eb34fabf712.png\",\n    \"images/touch/ms-touch-icon-144x144-precomposed.png\": \"images/touch/ms-touch-icon-144x144-precomposed.452d90b250d6f41a0c8f9db729113ffd.png\",\n    \"images/credit-cards/american-express.png\": \"images/credit-cards/american-express.8a5ade08365dcc7e5fa39a946bb76ab8.png\",\n    \"images/credit-cards/diners-club.png\": \"images/credit-cards/diners-club.03afaaa2d75264e332dc28309b7410b9.png\",\n    \"images/credit-cards/discover.png\": \"images/credit-cards/discover.f89468f36ba1a9080b3bb05b9587d470.png\",\n    \"images/credit-cards/jcb.png\": \"images/credit-cards/jcb.58f43e5f1fb8c6a4e7e76a17e7824e29.png\",\n    \"images/credit-cards/mastercard.png\": \"images/credit-cards/mastercard.373e4f1ac72b50605183e8216edde845.png\",\n    \"images/credit-cards/visa.png\": \"images/credit-cards/visa.26bcf191ee12e711aa540ba8d0c901b7.png\",\n    \"app_js.js\": \"app_js.5018c3226e10bf313701.js\",\n    \"app_css.css\": \"app_css.291431bdd7415f9ff51d.css\"\n  }\n}\n```\n\n#### Custom output formats\n\nWhat if you could easily format the output of the above file so it worked with\nexisting frameworks such as Ruby on Rails? Sure, no problem buddy.\n\nWhat if you want a custom output format that's not included? Again, no problem.\nJust pass in a function as the format option and it will get used. This is\nexplained in more detail below in the API section.\n\n#### Here's what's included\n\n- Assets include their logical paths for easy lookups on your server\n- You only have to keep track of your asset server in 1 place (your webpack config)\n- It's as small as possible and provides just enough info to do what it's intended to do\n- Supports multiple output formats\n\n## Installation\n\n`npm install --save manifest-revision-webpack-plugin`\n\n\n## Quick start\n\n```js\nvar ManifestRevisionPlugin = require('manifest-revision-webpack-plugin');\n\n// Where are your assets located in your project? This would typically be a path\n// that contains folders such as: images, stylesheets and javascript.\nvar rootAssetPath = './src/client';\n\nmodule.exports = {\n  module: {\n    loaders: [\n      {\n        test: /\\.(jpe?g|png|gif|svg)$/i,\n        loaders: [\n            'file?context=' + rootAssetPath + '&name=[path][name].[hash].[ext]'\n        ]\n      }\n    ]\n  },\n  plugins: [\n    new ManifestRevisionPlugin(path.join('build', 'manifest.json'), {\n        rootAssetPath: rootAssetPath,\n        ignorePaths: ['/stylesheets', '/javascript']\n    })\n  ]\n};\n```\n\n## API\n\n- `rootAssetPath` defines where it should start looking for assets.\n- `ignorePaths` is an array of paths to ignore. Path could be a string or regexp.\n- `extensionsRegex` is a regexp for assets you always want to include. Example: `/\\.(jpe?g|png|gif|svg)$/i`\n- `format` allows you to pick the manifest output file format.\n  - Currently supports `general` (default), `rails` or passing in a function.\n\nIf you want to use a custom function it could look like this:\n\n```js\n    // It must take 2 arguments. The first argument is the raw stats provided by\n    // Webpack. The second argument is an object list of each asset.\n    var myCoolFormatter = function (data, parsedAssets) {\n        console.log(data);\n        console.log('---');\n        console.log(parsedAssets);\n\n        // In this case we're returning an empty result.\n        return {};\n    };\n\n    new ManifestRevisionPlugin(path.join('build', 'manifest.json'), {\n        rootAssetPath: rootAssetPath,\n        ignorePaths: ['/stylesheets', '/javascript'],\n        format: myCoolFormatter,\n    })\n```\n\n### Is your custom formatter used in a popular framework?\n\nGreat, I would be more than happy to include it in this project. Just send a\npull request. Here's the rules for submitting an official formatter:\n\n- It must have a unit test\n- It must be well documented  (follow the other formatter examples)\n\nYou would end up modifying the following files:\n\n- [format.js](https://github.com/nickjj/manifest-revision-webpack-plugin/blob/master/format.js)\n  - The formatter's location\n- [formatTest.js](https://github.com/nickjj/manifest-revision-webpack-plugin/blob/master/tests/formatTest.js)\n  - Your unit test\n- [README.md](https://github.com/nickjj/manifest-revision-webpack-plugin/blob/master/README.md)\n  - Update the `format` API documentation\n\n## How would I use the manifest file?\n\nIt can be used with any server and any programming language. What you could do\nis read the `manifest.json` file in once when your app boots up. Then create a\ntemplate helper that accepts an asset and behind the scenes it will lookup\nthat asset and return back the real file name.\n\n### What would that look like on the server?\n\nOk, let's say you're using the jinja template engine. You've also created a\nhelper called `asset_for`.\n\n##### Call your template helper in a template:\n```jinja\n<img src=\"{{ asset_for('images/hamburger.svg') }}\" alt=\"Hamburger\">\n```\n\n##### It will produce this source code:\n```jinja\n<img src=\"images/hamburger.d2cb0dda3e8313b990e8dcf5e25d2d0f.svg\" alt=\"Hamburger\">\n```\n\n### What would the implementation of that look like?\n\nThere's too many web frameworks to include examples. As people use the project\nit would be nice to [create wiki pages](https://github.com/nickjj/manifest-revision-webpack-plugin/wiki)\nthat have end to end examples on how to implement it in popular web frameworks.\n\n- [Flask-Webpack](https://nickjanetakis.com/blog/manage-your-assets-with-flask-webpack): A Flask extension to use this plugin's `manifest.json`\n  - Contains a blog post and demo video explaining how to set things up\n\n## Contributors\n\n- Nick Janetakis <<nick.janetakis@gmail.com>>\n","readmeFilename":"README.md"}