{"_id":"hapi-cache-buster","_rev":"16-ded3534717674d4f92746771e5ae2243","name":"hapi-cache-buster","description":"Hapi plugin to a bust the cache of browser assets.","dist-tags":{"latest":"0.4.0"},"versions":{"0.0.1":{"name":"hapi-cache-buster","version":"0.0.1","description":"Hapi plugin to a bust the cache of browser assets.","main":"index.js","repository":{"type":"git","url":"https://github.com/poeticninja/hapi-cache-buster"},"keywords":["hapi","cache","plugin","view","templates","assets"],"author":{"name":"Saul Maddox"},"license":"MIT","bugs":{"url":"https://github.com/poeticninja/hapi-cache-buster/issues"},"dependencies":{"path":"~0.4.9","hoek":"~1.4.0","lodash":"~2.4.1"},"homepage":"https://github.com/poeticninja/hapi-cache-buster","_id":"hapi-cache-buster@0.0.1","dist":{"shasum":"2cc5d13ecc360766c8f1a8ee033c8ff28d42f00e","tarball":"https://registry.npmjs.org/hapi-cache-buster/-/hapi-cache-buster-0.0.1.tgz","integrity":"sha512-OSG6slXnV9XGUDXjWFhS5GvYSWMPj46y8T28nIgJqBSAZXhJJugyJj5Eh7T9KITMsGOO5Xxj12SUkJilgmYcTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBP/zPXccrtkVrBNeyaz3atMRZfF+we6wWZwK7GhjRvzAiEAp3HWcRt+11FhIAgHdjRLAPUvajMygZz0IlIs2Y0ArhY="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"poeticninja","email":"saul.maddox@gmail.com"},"maintainers":[{"name":"poeticninja","email":"saul.maddox@gmail.com"}]},"0.0.2":{"name":"hapi-cache-buster","version":"0.0.2","description":"Hapi plugin to a bust the cache of browser assets.","main":"index.js","repository":{"type":"git","url":"https://github.com/poeticninja/hapi-cache-buster"},"keywords":["hapi","cache","plugin","view","templates","assets"],"author":{"name":"Saul Maddox"},"license":"MIT","bugs":{"url":"https://github.com/poeticninja/hapi-cache-buster/issues"},"dependencies":{"path":"~0.4.9","hoek":"~1.4.0","lodash":"~2.4.1"},"homepage":"https://github.com/poeticninja/hapi-cache-buster","_id":"hapi-cache-buster@0.0.2","dist":{"shasum":"9c7c5401d08606ab96b91fa2a5873d9eac64c61a","tarball":"https://registry.npmjs.org/hapi-cache-buster/-/hapi-cache-buster-0.0.2.tgz","integrity":"sha512-Hw9cm8DQprK2nf1aUQAKtnxv5wDpWzmd0rJu63GWxOZsfFvkHYUQNdcNw1RgwFriMnAWdprwAi7h1q52ILg+Pw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZl7XyEIAoryfBR1QW23C8kFVFqZTXDTAH5ATVO3nKYwIgebi0H9p/mASkUhOv7XqnI3D8QY/ZhvRGYcNwX1WYa5w="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"poeticninja","email":"saul.maddox@gmail.com"},"maintainers":[{"name":"poeticninja","email":"saul.maddox@gmail.com"}]},"0.1.0":{"name":"hapi-cache-buster","version":"0.1.0","description":"Hapi plugin to a bust the cache of browser assets.","main":"index.js","repository":{"type":"git","url":"https://github.com/poeticninja/hapi-cache-buster"},"keywords":["hapi","cache","plugin","view","templates","assets"],"author":{"name":"Saul Maddox"},"license":"MIT","bugs":{"url":"https://github.com/poeticninja/hapi-cache-buster/issues"},"dependencies":{"path":"~0.4.x","hoek":"~1.4.x","lodash":"~2.4.x"},"homepage":"https://github.com/poeticninja/hapi-cache-buster","_id":"hapi-cache-buster@0.1.0","dist":{"shasum":"fadcf5ddb102dc27d3e858d369667046c5bdeeb9","tarball":"https://registry.npmjs.org/hapi-cache-buster/-/hapi-cache-buster-0.1.0.tgz","integrity":"sha512-8zxMt4BM7/QQxGWMQ/FjxPE9rciTYvp2jEECH4759Ay1ntnyLcAofATfzmHN+eShZqPEOFNPXu2gxxDVSWvxag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIER4zeroCyONjvhJtFKnhzON9EdQrE+5x1MUx5sRAeTZAiEAnTUNkU6ojMW0FFdrIwJ2OOddxFNlZuVNgBI0Cgp8sbo="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"poeticninja","email":"saul.maddox@gmail.com"},"maintainers":[{"name":"poeticninja","email":"saul.maddox@gmail.com"}]},"0.2.0":{"name":"hapi-cache-buster","version":"0.2.0","description":"Hapi plugin to a bust the cache of browser assets.","main":"index.js","repository":{"type":"git","url":"https://github.com/poeticninja/hapi-cache-buster"},"keywords":["hapi","cache","plugin","view","templates","assets"],"author":{"name":"Saul Maddox"},"license":"MIT","bugs":{"url":"https://github.com/poeticninja/hapi-cache-buster/issues"},"dependencies":{"path":"~0.4.x","hoek":"~1.4.x","lodash":"~2.4.x"},"homepage":"https://github.com/poeticninja/hapi-cache-buster","_id":"hapi-cache-buster@0.2.0","dist":{"shasum":"57c0b14f300ab82524a29bde1cec874b3da0ef40","tarball":"https://registry.npmjs.org/hapi-cache-buster/-/hapi-cache-buster-0.2.0.tgz","integrity":"sha512-70Nm/l2ecQPqJpeQ5QVs2C78x4GLwwiClMI63PlobQ2UUWDFpeqjzvDspv8IQ73BLgNTseruNR5QGO/jgeJFEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi44rkWyE8b814stSe4k7oAmCgKDUodvMy9nNqZvcj6AIgIshxlqTwONhAqBg0esRq4a0hetIS9IVjx5aGg0bORuw="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"poeticninja","email":"saul.maddox@gmail.com"},"maintainers":[{"name":"poeticninja","email":"saul.maddox@gmail.com"}]},"0.3.0":{"name":"hapi-cache-buster","version":"0.3.0","description":"Hapi plugin to a bust the cache of browser assets.","main":"index.js","repository":{"type":"git","url":"https://github.com/poeticninja/hapi-cache-buster"},"keywords":["hapi","cache","plugin","view","templates","assets"],"author":{"name":"Saul Maddox"},"license":"MIT","bugs":{"url":"https://github.com/poeticninja/hapi-cache-buster/issues"},"dependencies":{"path":"~0.4.x","hoek":"~1.4.x","lodash":"~2.4.x"},"gitHead":"180fd679818c25092b471c37b846292d7a12ca23","homepage":"https://github.com/poeticninja/hapi-cache-buster","_id":"hapi-cache-buster@0.3.0","scripts":{},"_shasum":"28d1cbe926716ba6112e17fcf41fc7888b6f6bf4","_from":".","_npmVersion":"2.1.9","_nodeVersion":"0.10.32","_npmUser":{"name":"poeticninja","email":"saul.maddox@gmail.com"},"maintainers":[{"name":"poeticninja","email":"saul.maddox@gmail.com"}],"dist":{"shasum":"28d1cbe926716ba6112e17fcf41fc7888b6f6bf4","tarball":"https://registry.npmjs.org/hapi-cache-buster/-/hapi-cache-buster-0.3.0.tgz","integrity":"sha512-Wy1Tm0Qm9H1z2KqxC4Mhzz9SqHBLRJyQ2fdwL7PWilkyEKSIEqP6Kywj0fkolcEMBxyqeyD0q8RkSmoKQC8Q2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClN5DfsEPv/GUT+OquLiiqAbnnMUc2kWoYksJbAagP9AIgSmrjGBKW+tajppLFXTx2NMezaJpx1/l1Vbx/c7K2npI="}]}},"0.4.0":{"name":"hapi-cache-buster","version":"0.4.0","description":"Hapi plugin to a bust the cache of browser assets.","main":"index.js","repository":{"type":"git","url":"https://github.com/poeticninja/hapi-cache-buster"},"scripts":{"test":"./node_modules/lab/bin/lab"},"keywords":["hapi","cache","plugin","view","templates","assets"],"author":{"name":"Saul Maddox"},"license":"MIT","bugs":{"url":"https://github.com/poeticninja/hapi-cache-buster/issues"},"dependencies":{"path":"~0.4.x"},"devDependencies":{"cheerio":"~0.19.0","code":"~1.4.0","hapi":"~8.4.0","lab":"~5.5.1","swig":"~1.4.2"},"gitHead":"6c5c8ddbcbf3f79cdb082012eb36c382b640b917","homepage":"https://github.com/poeticninja/hapi-cache-buster","_id":"hapi-cache-buster@0.4.0","_shasum":"2796e2a2f9d44b475aa71dfd94ea415f2873428a","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"poeticninja","email":"saul.maddox@gmail.com"},"maintainers":[{"name":"poeticninja","email":"saul.maddox@gmail.com"}],"dist":{"shasum":"2796e2a2f9d44b475aa71dfd94ea415f2873428a","tarball":"https://registry.npmjs.org/hapi-cache-buster/-/hapi-cache-buster-0.4.0.tgz","integrity":"sha512-gzbA6Ma9mJeHlF4GASaF+PcgBWRRvTClIp6ZOCkCwbkmY4ZmR4Ypqu/TpS7kxO0rrCn4ITq1/FiF1MOekMCTCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDhxJD8FqtQWnKINohcvdD9huUp8KgKJzYnYrQZ0wYzPAiEAjG+9kAD1Hh+0PrMkD//FxHdx04XB3+1ZGIKmCysS3i0="}]}}},"readme":"Hapi Cache Buster\n=================\n\nA Hapi cache buster for assets (css, javascript, images, etc) in your view templates.\n\n## Goal:\nHave the client/browser reload new assets when there is a new version.\n\n## How it works:\nIt grabs the package.json version number of your application from the node process current working directory and uses that as the cache version. In your view template you can now access `version.cache`. You can place it where you are needing to update cache.\n\nLets say your package.json is version `0.0.1`, it will print out `?v=001`. To bust the cache you just update your package.json version to a new number.\n\n\nHandlebars:\n`<link rel=\"stylesheet\" href=\"css/styles.css{{version.cache}}\">`\n\nJade:\n`link(rel='stylesheet', href='css/styles.css#{version.cache}')`\n\n### Options\nInstead of using the package.json version for the cache version, you can specify a number and pass it into the plugin options.\n\n```\n{\n  register: require('hapi-cache-buster'),\n  options: {\n    version: 55\n  }\n}\n```\n\n\n### Other\nYou can see this being used in the Hapi Ninja boilerplate example. [https://github.com/poeticninja/hapi-ninja](https://github.com/poeticninja/hapi-ninja)\n\n### Troubleshooting\nIf for some reason you are getting an error because its unable to find the package.json you can actually pass in the package.json version manually `require('./package.json').version`. This is useful if your current process working directory `process.cwd()` is different from the actual application.\n","maintainers":[{"name":"poeticninja","email":"saul.maddox@gmail.com"}],"time":{"modified":"2022-06-18T19:02:31.246Z","created":"2014-01-05T21:21:38.598Z","0.0.1":"2014-01-05T21:21:40.414Z","0.0.2":"2014-01-06T23:25:11.418Z","0.1.0":"2014-01-19T16:26:58.681Z","0.2.0":"2014-06-15T18:23:37.649Z","0.3.0":"2014-12-26T19:47:00.125Z","0.4.0":"2015-04-04T16:03:55.288Z"},"author":{"name":"Saul Maddox"},"repository":{"type":"git","url":"https://github.com/poeticninja/hapi-cache-buster"},"readmeFilename":"README.md","users":{"poeticninja":true},"homepage":"https://github.com/poeticninja/hapi-cache-buster","keywords":["hapi","cache","plugin","view","templates","assets"],"bugs":{"url":"https://github.com/poeticninja/hapi-cache-buster/issues"},"license":"MIT"}