{"_id":"@apimediaru/gulp-twig","_rev":"3-73a8d9b32e6daa029d691e6e72e32e17","name":"@apimediaru/gulp-twig","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@apimediaru/gulp-twig","description":"Twig.js plugin for gulp.js (gulpjs.com)","version":"1.0.0","homepage":"https://github.com/apimediaru/gulp-twig","repository":{"type":"git","url":"git+https://github.com/apimediaru/gulp-twig.git"},"author":{"name":"Simon de Turck","email":"simon@zimmen.com","url":"http://www.zimmen.com"},"main":"./index.js","dependencies":{"fancy-log":"^1.3.3","map-stream":"^0.1.0","plugin-error":"^1.0.1","replace-ext":"^2.0.0","twig":"^1.15.1"},"devDependencies":{"mocha":"*","should":"*","vinyl":"^2.2.0"},"scripts":{"test":"mocha -R spec"},"engines":{"node":">=4.0"},"keywords":["twig","twig.js","gulp","gulpplugin","gulp-plugin"],"licenses":[{"type":"MIT","url":"http://github.com/zimmen/gulp-twig/raw/master/LICENSE"}],"gitHead":"77b3aea6cb26793d9db7326323da01af0337a781","bugs":{"url":"https://github.com/apimediaru/gulp-twig/issues"},"_id":"@apimediaru/gulp-twig@1.0.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.6","dist":{"integrity":"sha512-x9+uIJ1fq2ERh6ktyD2sIDWVaQkPIwEVYrnNQ/6KqJJZZt1LhhT7w//n9Z+JrkJkG4dsr9we9z73NidMfpRuww==","shasum":"f88c51e5772a49ef68c8632dd026f24b1e793ebd","tarball":"https://registry.npmjs.org/@apimediaru/gulp-twig/-/gulp-twig-1.0.0.tgz","fileCount":17,"unpackedSize":19824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNpUfCRA9TVsSAnZWagAAxlQP/jIajX56txOlZxePJCCC\n/LW/aMFYdKWVDzK2fPHNiuAZqzvbTxfPi67YsIrJS2O5wzKKbqKLsBku/OM6\nLPGgl1yHwfRytv1j0AG3HJ1bxtowgskyU5O4Ow/Jg7+4yF+4+axW1HMrm6Rn\n+rSRZW+76QHYOZraQoX4+qG3l7VfseOo2yvZNUTlV7be20XEtuIpjxZIGjQy\nib/qgrMOEk5uWOpyCb0Pr+7S/05aVIrT9n/mYE0rAX3JQYVjzDBtNquXwGF8\nYaLM0BdwmKoOU4oiBD3L67qL8h2Vfmbn1s0NLMAieNLBB8Rq1XFq/Rhqlrs3\nbWMYKiURglLEc77+cdauJap/m+KFXf0CZwwqnumNzWj5IGm76uo+x3dz5X5X\nv57qjk2feJcvz6HpNNMYwRTbChkJEjj8SYt9jIhyKm0qlkXpAND3aYNArYB6\ngpyEVfKISTQkKCqu2sLaqPrc00DqRPDuE+Zaywb4IhnV3R8sX4YnjykP4yfI\nU8+AtHMp5m7hX6ySHzFOWEbVDXUV3ZgNfezthOrxEKGOO8CEJxWxYjMfZM5m\nd6XJNLN2tFyo1k8Hz8+K2Ru1/G0FBAGS6qZ+26aakfZdmmrEC0xjOzbsxNS+\nKbQtpoVwL0mtVOrxtApXYXqBiDPfLrX1eu5ofvyDgiPpdC9coGP3p8/FDo5b\nhdS1\r\n=uyvK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDK2u+99lEdddbUqczk1/UTd7oCHFFv6kqdnUvYcGvC0AiBRU9fAkNOGfwwAk1Wc3cGv1r74NrY/8QdvueN5qZRXVA=="}]},"maintainers":[{"name":"exileofaranei","email":"anoceanofmyownregret@gmail.com"},{"name":"graandy","email":"it@apimedia.ru"}],"_npmUser":{"name":"exileofaranei","email":"anoceanofmyownregret@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-twig_1.0.0_1597412639170_0.8326329066085012"},"_hasShrinkwrap":false},"1.0.1":{"name":"@apimediaru/gulp-twig","description":"Twig.js plugin for gulp.js (gulpjs.com)","version":"1.0.1","homepage":"https://github.com/apimediaru/gulp-twig","repository":{"type":"git","url":"git+https://github.com/apimediaru/gulp-twig.git"},"author":{"name":"Simon de Turck","email":"simon@zimmen.com","url":"http://www.zimmen.com"},"main":"./index.js","dependencies":{"fancy-log":"^1.3.3","map-stream":"^0.1.0","plugin-error":"^1.0.1","replace-ext":"^2.0.0","twig":"^1.15.1"},"devDependencies":{"mocha":"*","should":"*","vinyl":"^2.2.0"},"scripts":{"test":"mocha -R spec"},"engines":{"node":">=4.0"},"keywords":["twig","twig.js","gulp","gulpplugin","gulp-plugin"],"licenses":[{"type":"MIT","url":"http://github.com/zimmen/gulp-twig/raw/master/LICENSE"}],"gitHead":"88978b8d3b04091b54026f27810afc63c5a162f6","bugs":{"url":"https://github.com/apimediaru/gulp-twig/issues"},"_id":"@apimediaru/gulp-twig@1.0.1","_nodeVersion":"14.18.1","_npmVersion":"8.1.1","dist":{"integrity":"sha512-6WKwgvAAnlnXt+GhUrOnKOeLZY1/Pg6y2ouVpCh823jCLcvN61u9zFXs5GKDS+GXMoYS9DoiM1k7lKIeL60L5A==","shasum":"8be2eea751feae5eedeb4569ee1af596295bb19e","tarball":"https://registry.npmjs.org/@apimediaru/gulp-twig/-/gulp-twig-1.0.1.tgz","fileCount":17,"unpackedSize":19947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzFiECRA9TVsSAnZWagAA+NoP/RbDNtgAVDZUoijTzMhq\nn6uKSBeNuGZ0IiL8kqJw8VE8+WRFeqdg/7f0E7F68KGScLfYLt4QVOUXpaq/\nfGi04itqHPm/cDfdk2GZFcfiFi62xtEzyWivgLxdyZcTqwrtc8O91dYotRRc\n3+7CLrzjUq7KeDwykXoVMe8jeyLDPFapuM09v/pcomT3GhEcQG2FkOBSipH9\nayIDPnFOYiXmDS/7lMJup2FdKO5m/W6yF5b6JQdi4ZDj22UD85k9FFOt08mP\noj/tp4NQYyt4R2Egzi3mowfnU0zLYsqr8+SGKSy6GTvSxbXAc0oHHoLMW0Xm\nefBSTbvQEkh+JLlpEaIm2pzG4toDucEx2WwmiKHZCaSeMEX4emC/PRlV8xoj\nzulqiQmR63DT/F2l2rPEp8RX6rdETdw3uqYOFemy6zQDfAJNsknTjL2x9jZV\n41sZd1xTG88CfVhWqbRNydoOPivte8YmGSUL6c109Zh0yRt69nd7q+JKRqSL\nsahstFlVNomvLJVAGfBvMZ0b+Qrq5bMi/CLuN2fIRgQMVzdvk5UwRGKcMb+V\nGUKiD4HjnJWklPrK7WWvKRTADmzP+PqEiz2e4SqgqGgjAQPt4xDUkKdet8++\n9wJco6HFQ2nd/h0DJ38IZdRqVm86k9ggxcfAHoNEmu7SebqGzq7AbjaMiuJu\nDfZm\r\n=k7El\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGc8Yfb158uQJx31OXXjMbxOonKJe6UwpWyJC2IvyzPzAiEA9JAz7UIg08PN0wWJ0hIj3XEXJgagkPmPmkJ5StpiOss="}]},"_npmUser":{"name":"exileofaranei","email":"anoceanofmyownregret@gmail.com"},"directories":{},"maintainers":[{"name":"graandy","email":"it@apimedia.ru"},{"name":"exileofaranei","email":"anoceanofmyownregret@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-twig_1.0.1_1635276831463_0.20277642147748964"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-14T13:43:49.608Z","1.0.0":"2020-08-14T13:43:59.293Z","modified":"2022-04-04T14:38:08.392Z","1.0.1":"2021-10-26T19:33:51.587Z"},"maintainers":[{"name":"graandy","email":"it@apimedia.ru"},{"name":"exileofaranei","email":"anoceanofmyownregret@gmail.com"}],"description":"Twig.js plugin for gulp.js (gulpjs.com)","homepage":"https://github.com/apimediaru/gulp-twig","keywords":["twig","twig.js","gulp","gulpplugin","gulp-plugin"],"repository":{"type":"git","url":"git+https://github.com/apimediaru/gulp-twig.git"},"author":{"name":"Simon de Turck","email":"simon@zimmen.com","url":"http://www.zimmen.com"},"bugs":{"url":"https://github.com/apimediaru/gulp-twig/issues"},"readme":"[![Build Status](https://travis-ci.org/zimmen/gulp-twig.png?branch=master)](https://travis-ci.org/zimmen/gulp-twig)\r\n\r\n<table>\r\n<tr>\r\n<td>Package</td><td>gulp-twig</td>\r\n</tr>\r\n<tr>\r\n<td>Description</td>\r\n<td>Twig plugin for gulp.js, The streaming build system</td>\r\n</tr>\r\n<tr>\r\n<td>Node Version</td>\r\n<td>>= 4</td>\r\n</tr>\r\n<tr>\r\n<td>Gulp Version</td>\r\n<td>3.x</td>\r\n</tr>\r\n</table>\r\n\r\n\r\nCompile [Twig.js](https://github.com/justjohn/twig.js) templates with Gulp. Build upon [Twig.js](https://github.com/justjohn/twig.js) , the JS port of the Twig templating language by John Roepke.\r\n\r\nYou can use this plugin with [gulp-data](https://www.npmjs.com/package/gulp-data).\r\n\r\n## Usage\r\n\r\n### Install\r\n\r\n```bash\r\nnpm install gulp-twig --save\r\n```\r\n### Example\r\n\r\n```html\r\n{# index.twig #}\r\n{% extends \"layout.twig\" %}\r\n\r\n{% block page %}\r\n    <header>\r\n        <h1>Gulp and Twig.js</h1>\r\n    </header>\r\n    <p>\r\n        This page is generated by Twig.js using the gulp-twig gulp plugin.\r\n    </p>\r\n    <ul>\r\n        {% for value in benefits %}\r\n            <li>{{ value }}</li>\r\n        {% endfor %}\r\n    </ul>\r\n{% endblock %}\r\n```\r\n\r\n```html\r\n{# layout.twig #}\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <meta charset=\"utf-8\"/>\r\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\"/>\r\n    <meta name=\"description\" content=\"A demo of how to use gulp-twig\"/>\r\n    <meta name=\"author\" content=\"Simon de Turck\"/>\r\n    <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\r\n\r\n    <title>{{ title }}</title>\r\n\r\n</head>\r\n<body>\r\n<section>\r\n    {% block page %}{% endblock %}\r\n</section>\r\n</body>\r\n</html>\r\n```\r\n\r\n```javascript\r\nvar gulp = require('gulp');\r\n\r\ngulp.task('compile', function () {\r\n    'use strict';\r\n    var twig = require('gulp-twig');\r\n    return gulp.src('./index.twig')\r\n        .pipe(twig({\r\n            data: {\r\n                title: 'Gulp and Twig',\r\n                benefits: [\r\n                    'Fast',\r\n                    'Flexible',\r\n                    'Secure'\r\n                ]\r\n            }\r\n        }))\r\n        .pipe(gulp.dest('./'));\r\n});\r\n\r\ngulp.task('default', ['compile']);\r\n```\r\n\r\n### Options:\r\n**data**: [object| *The data that is exposed in the twig files. Or use gulp-data to pipe files directly into gulp-twig*\r\n\r\n**base**: [string] *sets the views base folder. Extends can be loaded relative to this path*\r\n\r\n**errorLogToConsole**: [true|false] *logs errors to console (defaults to false)*\r\n\r\n**onError**: [function] *handle error yourself*\r\n\r\n**cache**: [true|false] *enables the Twig cache. (defaults to false)*\r\n\r\n**debug**: [true|false] *enables debug info logging (defaults to false)*\r\n\r\n**trace**: [true|false] *enables tracing info logging (defaults to false)*\r\n\r\n**extend**: [function (Twig)] *extends Twig with new tags types. The Twig attribute is Twig.js's internal object. [Read more here](https://github.com/justjohn/twig.js/wiki/Extending-twig.js-With-Custom-Tags)*\r\n\r\n**extname**: [string|true|false] *output file extension including the '.' like path.extname(filename). Use `true` to keep source extname and a \"falsy\" value to drop the file extension*\r\n\r\n**useFileContents**: [true|false] *use file contents instead of file path (defaults to false) [Read more here](https://github.com/zimmen/gulp-twig/issues/30)*\r\n\r\n**functions**: [array] *extends Twig with given function objects. (default to undefined)*\r\n```javascript\r\n[\r\n    {\r\n        name: \"nameOfFunction\",\r\n        func: function (args) {\r\n            return \"the function\";\r\n        }\r\n    }\r\n]\r\n```\r\n\r\n**filters**: [array] *extends Twig with given filter objects. (default to undefined)*\r\n```javascript\r\n[\r\n    {\r\n        name: \"nameOfFilter\",\r\n        func: function (args) {\r\n            return \"the filter\";\r\n        }\r\n    }\r\n]\r\n```\r\n### LICENSE\r\n\r\n(MIT License)\r\n\r\nCopyright (c) 2015 Simon de Turck <simon@zimmen.com> www.zimmen.com\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n\"Software\"), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n","readmeFilename":"README.md"}