{"_id":"hmpo-govuk-template","_rev":"26-9d256c54a91ed334add177d8d4aad1bd","name":"hmpo-govuk-template","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.0":{"name":"hmpo-govuk-template","version":"0.0.0","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","scripts":{"postinstall":"node ./build/index.js"},"main":"index.js","repository":{"type":"git","url":"https://github.com/UKHomeOffice/govuk-template-compiler.git"},"author":"","bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","dependencies":{"govuk_template_mustache":"0.12.0","hogan.js":"3.0.2","serve-static":"1.8.1"},"gitHead":"e45de6f6819060c668796f6086bb77c99f1fbd9e","_id":"hmpo-govuk-template@0.0.0","_shasum":"172ad8e0e71704c14b4d64605e0ebd8530d9d018","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"maintainers":[{"name":"lennym","email":"leonard.martin@gmail.com"}],"dist":{"shasum":"172ad8e0e71704c14b4d64605e0ebd8530d9d018","tarball":"https://registry.npmjs.org/hmpo-govuk-template/-/hmpo-govuk-template-0.0.0.tgz","integrity":"sha512-wRafnE3UyGVn3HBXy62qGmh4yJs+i02fS2vQ2V80z5lVKgHh2Tcx1VOvc4INgZNY3QePZLSl+ng4OXoIKmK6hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCp4LWhMEkFYtrSLsqH6jjMwTo+LxI8jyzjv2YB5CYFXAIhAOO5PEjCxrga8caABTPlHj0OI2azf3utPOF4Arb7a0fu"}]}},"0.0.1":{"name":"hmpo-govuk-template","version":"0.0.1","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","scripts":{"postinstall":"node ./build/index.js"},"main":"index.js","repository":{"type":"git","url":"https://github.com/UKHomeOffice/govuk-template-compiler.git"},"author":"","bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","dependencies":{"govuk_template_mustache":"0.12.0","hogan.js":"3.0.2","serve-static":"1.8.1"},"gitHead":"ea739dcfe43e45c78768a9fe0c53a6434300f94c","_id":"hmpo-govuk-template@0.0.1","_shasum":"9e1a985e3cff50ba4180e6b7d526ee0025a06904","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"maintainers":[{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"sebinsua","email":"me@sebinsua.com"}],"dist":{"shasum":"9e1a985e3cff50ba4180e6b7d526ee0025a06904","tarball":"https://registry.npmjs.org/hmpo-govuk-template/-/hmpo-govuk-template-0.0.1.tgz","integrity":"sha512-O5r6aKM7JQ4JmAqSwLqP3/SQK2kyxFkUXcf+3gli1mJfaNnQgR95N9ElHqBndQdmOrl62xOlquTIkfu7WD4xeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkApvgG/2zf7IU5OKEN9T2Cmvmwb4c8ydirokGfAEKbAiBwON8/T8DtaoPENJIEj1p0YsrTbrZSHEUXdU6HLjc6hQ=="}]}},"0.0.2":{"name":"hmpo-govuk-template","version":"0.0.2","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","scripts":{"postinstall":"node ./build/index.js"},"main":"index.js","repository":{"type":"git","url":"https://github.com/UKHomeOffice/govuk-template-compiler.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","dependencies":{"govuk_template_mustache":"0.12.0","hogan.js":"3.0.2","serve-static":"1.8.1"},"gitHead":"2148c83007cc2d012388f2e2496207e777cbf547","_id":"hmpo-govuk-template@0.0.2","_shasum":"d0f2ef7dac3562ee18139c1637637f3a9b84ac05","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"maintainers":[{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"sebinsua","email":"me@sebinsua.com"}],"dist":{"shasum":"d0f2ef7dac3562ee18139c1637637f3a9b84ac05","tarball":"https://registry.npmjs.org/hmpo-govuk-template/-/hmpo-govuk-template-0.0.2.tgz","integrity":"sha512-GaGGTebnAz/wxhTbJukbq6KHPF8qDVFkMd8XXN7fNEWb+uq7ZxCf1X1AJjEeHp0mZAm2NNHfJqn39zp5DlRZ/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1L5bxQEuOGQzbztT/wTRV4h7ngvNl6STe5K97v66YLAIhAKEAvpZBrsx/cJFifz9oEUFcoUBa21o++A/9vEQGsZwk"}]}},"0.0.3":{"name":"hmpo-govuk-template","version":"0.0.3","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","scripts":{"postinstall":"node ./build/index.js"},"main":"index.js","repository":{"type":"git","url":"https://github.com/UKHomeOffice/govuk-template-compiler.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","dependencies":{"govuk_template_mustache":"0.12.0","hogan.js":"3.0.2","serve-static":"1.8.1"},"gitHead":"7ebfe04311fecaeffe586fb95e624980ba4a11cd","_id":"hmpo-govuk-template@0.0.3","_shasum":"78ff2b9d776e9f38c33fa7f463a51033890c04f4","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"maintainers":[{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"sebinsua","email":"me@sebinsua.com"}],"dist":{"shasum":"78ff2b9d776e9f38c33fa7f463a51033890c04f4","tarball":"https://registry.npmjs.org/hmpo-govuk-template/-/hmpo-govuk-template-0.0.3.tgz","integrity":"sha512-5wVCHllVNuLxosbW2XF6XIVmojqKXlOPTnsRRAJ+Y+a6091Arp2ONKzuU6x9bmVgPcGHwc0n7J7H2cSI49Ccow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDubl0vtaKrQjyubesaqq82jYUK7W8hLJGOYoiOboBZIgIgBLg9tOlEyB6W7ZvjkDKE6vSc3JNbQPOTdO4y8oMvT/A="}]}},"0.1.0":{"name":"hmpo-govuk-template","version":"0.1.0","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","scripts":{"postinstall":"node ./build/index.js"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/UKHomeOffice/govuk-template-compiler.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","dependencies":{"govuk_template_mustache":"^0.17.3","hogan.js":"3.0.2","serve-static":"^1.10.3"},"gitHead":"a633c4d592722453fcddeaf35b0082ad6baee3a8","_id":"hmpo-govuk-template@0.1.0","_shasum":"f3787fd939071e863477657b5d117328594a917c","_from":".","_npmVersion":"2.15.6","_nodeVersion":"0.10.29","_npmUser":{"name":"hughepaul","email":"paul@hughe.co.uk"},"dist":{"shasum":"f3787fd939071e863477657b5d117328594a917c","tarball":"https://registry.npmjs.org/hmpo-govuk-template/-/hmpo-govuk-template-0.1.0.tgz","integrity":"sha512-gTU4x2+9rE+gfoAfAK16XK/qTFHfUTjJ4m7Xns6V1LwclcJ4CBuYmlbQDxBwapy4gQmEawIqKu3KIsbe5gLxQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHG7zQ6T09fbUAm8OlIryRpwIUYAIXWwBZd0UPNbYkwhAiB5GZbHKcfY9QLxMc9Iy2nzhFrVlAktwawjm0uAQNoRqA=="}]},"maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"gavboulton","email":"gavboulton@gmail.com"},{"name":"hughepaul","email":"paul@hughe.co.uk"},{"name":"lennym","email":"leonard.martin@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hmpo-govuk-template-0.1.0.tgz_1465464279907_0.12011224776506424"}},"0.1.1":{"name":"hmpo-govuk-template","version":"0.1.1","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","scripts":{"postinstall":"node ./build/index.js"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/UKHomeOffice/govuk-template-compiler.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","dependencies":{"govuk_template_mustache":"^0.17.3","hogan.js":"3.0.2","serve-static":"^1.10.3"},"gitHead":"7972e40bfd80dde9a136e396c22ae833bf06909b","_id":"hmpo-govuk-template@0.1.1","_shasum":"30c9177b85dbc7321ea336931d66c7a37d55eef5","_from":".","_npmVersion":"3.10.5","_nodeVersion":"4.4.6","_npmUser":{"name":"hughepaul","email":"paul@hughe.co.uk"},"dist":{"shasum":"30c9177b85dbc7321ea336931d66c7a37d55eef5","tarball":"https://registry.npmjs.org/hmpo-govuk-template/-/hmpo-govuk-template-0.1.1.tgz","integrity":"sha512-BigQ8tH3yPSIeDz9gDz8SuX37F5pfID01zp4axJq6V/vzpUUBQf/LAi350tnko0yd+7ReSwZUFpuAMi9wuUsgw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFH+DUTpM41zryq2qOwqYUYgLjQpO7ohfTWWsbrT/8t/AiASlwwJH0COn4bNCGLJnfVvt8C54nqEaPqUhvsZ8OOdLQ=="}]},"maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"gavboulton","email":"gavboulton@gmail.com"},{"name":"hughepaul","email":"paul@hughe.co.uk"},{"name":"lennym","email":"leonard.martin@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/hmpo-govuk-template-0.1.1.tgz_1470051375549_0.46178567316383123"}},"0.2.0":{"name":"hmpo-govuk-template","version":"0.2.0","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","scripts":{"postinstall":"node ./build/index.js"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/UKHomeOffice/govuk-template-compiler.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","dependencies":{"govuk_template_mustache":"^0.17.3","hogan.js":"3.0.2","serve-static":"^1.10.3"},"gitHead":"347c808f37561847c14d4a0dc25a6255dd871180","_id":"hmpo-govuk-template@0.2.0","_shasum":"9b75c5c246880897b9f6b1d73399200937d0d259","_from":".","_npmVersion":"3.10.9","_nodeVersion":"4.4.6","_npmUser":{"name":"hughepaul","email":"paul@hughe.co.uk"},"dist":{"shasum":"9b75c5c246880897b9f6b1d73399200937d0d259","tarball":"https://registry.npmjs.org/hmpo-govuk-template/-/hmpo-govuk-template-0.2.0.tgz","integrity":"sha512-l6zQQngglCiyBhF/980sWn6VHaMMBbCEgH13zEa/TU0jALJxtophLSzYvXGUu/BNyJoxk24lsHsTskIVbZ2zlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGBANRMWNsOW3+KM7wHxYTmKjBtK6YfCJ6rxGvsMT2/4AiA2NHEbcpcuLkR17I6jhHX1CoD5hFfcQQpzQp9zNuDJXg=="}]},"maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"gavboulton","email":"gavboulton@gmail.com"},{"name":"hughepaul","email":"paul@hughe.co.uk"},{"name":"lennym","email":"leonard.martin@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/hmpo-govuk-template-0.2.0.tgz_1478787220334_0.6012238471303135"}}},"readme":"# hmpo-govuk-template\n\nCompiles govuk mustache template into a more usable format and provide middleware for use in apps.\n\nExisting [govuk mustache template](https://www.npmjs.com/package/govuk_template_mustache) has simple mustache placeholders for content sections, which necessitates a two step compile process where sections are compiled individually and then again into the parent template.\n\nCompiling the template to replace these placeholders with variables allows for templates to implement the govuk template as a parent partial.\n\n## Example\n\n```\n{{< govuk-template}}\n\n    {{$main}}\n        <h1>Page Content</h1>\n    {{/main}}\n\n{{/ govuk-template}}\n```\n\n## Installation\n\n```\nnpm install [--save] hmpo-govuk-template\n```\n\n## Usage\n\nThe compilation of the template is performed automatically as an npm postinstall hook.\n\nWhen used as part of an express app, a setup method is provided which will add a static-middleware (using [serve-static](https://www.npmjs.com/package/serve-static)) to serve the template assets without needing to copy them to any other location.\n\nIt will also add the template as a mustache partial with a name of \"govuk-template\".\n\n### To configure express middleware\n```\nrequire('hmpo-govuk-template').setup(app[, { ... options ...}]);\n```\n\n### To only load the partial location but not serve the assets use the template function. The `govukAssetPath` local will need to set to the absolute public asset location.\n```\napp.use(function (req, res, next) {\n    res.locals = res.locals || {};\n    res.locals.govukAssetPath = '/absolute/asset/path'\n});\napp.use(require('hmpo-govuk-template').template);\n```\n\n### To use the mustache partial\n```\n{{< govuk-template}}\n    {{$pageTitle}}An example page{{/pageTitle}}\n    {{$main}}\n        <h1>Page Content</h1>\n    {{/main}}\n{{/ govuk-template}}\n```\n\n## Options\n\nA number of options can be passed with the app into the setup method:\n\n* `path` - Sets the base path for the location of static assets - Default: `/govuk-assets`\n\nOther options are passed onto the [serve-static](https://www.npmjs.com/package/serve-static) configuration, and more details can be found in [the serve-static documentation](https://www.npmjs.com/package/serve-static)\n\n## Example\n\nThere is an example implmentation in '/example'. To run:\n\n```\ncd example\nnpm install\nnpm start\n```","maintainers":[{"email":"oliweighell@yahoo.co.uk","name":"oliweighell"},{"email":"merlinc@thecourtsofchaos.com","name":"merlinc"},{"email":"paul@hughe.co.uk","name":"hughepaul"}],"time":{"modified":"2022-06-18T20:59:10.085Z","created":"2015-02-06T12:16:08.536Z","0.0.0":"2015-02-06T12:16:08.536Z","0.0.1":"2015-02-06T16:03:18.675Z","0.0.2":"2015-02-10T17:24:11.768Z","0.0.3":"2015-02-13T16:50:19.618Z","0.1.0":"2016-06-09T09:24:42.183Z","0.1.1":"2016-08-01T11:36:16.206Z","0.2.0":"2016-11-10T14:13:40.833Z"},"homepage":"https://github.com/UKHomeOffice/govuk-template-compiler","repository":{"type":"git","url":"git+https://github.com/UKHomeOffice/govuk-template-compiler.git"},"bugs":{"url":"https://github.com/UKHomeOffice/govuk-template-compiler/issues"},"readmeFilename":"README.md","license":"MIT"}