{"_id":"@alexkomm/twig-loader","_rev":"1-88703a5655b996b1995faacee696b292","name":"@alexkomm/twig-loader","dist-tags":{"latest":"0.4.5"},"versions":{"0.4.5":{"name":"@alexkomm/twig-loader","version":"0.4.5","description":"Webpack loader for compiling twig.js templates","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git+https://github.com/alexkomm/twig-loader.git"},"author":{"name":"Mathieu Maes @ Zimmo.be"},"license":"MIT","bugs":{"url":"https://github.com/alexkomm/twig-loader/issues"},"homepage":"https://github.com/alexkomm/twig-loader#readme","peerDependencies":{"twig":"^1.15.3"},"dependencies":{"hasha":"^3.0.0","loader-utils":"^1.1.0","map-cache":"^0.2.2","schema-utils":"^0.4.5","underscore":"^1.9.1"},"devDependencies":{"mocha":"^5.2.0","should":"^13.2.1","twig":"^1.15.3"},"directories":{"lib":"lib","test":"test"},"publishConfig":{"@akommv:registry":"https://npm.pkg.github.com"},"gitHead":"30444dbf46a2f42774ad1c407a8bedef5e66089f","_id":"@alexkomm/twig-loader@0.4.5","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-PuQL3iExijjv9q7+Rlgil0uQh96OC6wFOC8uIKN8lHpAODUsgMQiTbMuKOMSVx0FE2bw6E23G6bFeGcw+D03Bw==","shasum":"a46c243626ed66e20a183b94a5efb303d39a1c19","tarball":"https://registry.npmjs.org/@alexkomm/twig-loader/-/twig-loader-0.4.5.tgz","fileCount":21,"unpackedSize":17391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQyLRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOLRAAovCHr294KfAFNwK2H3o+EEHVn2TFKBHOQHMNy6jyvXlSBHuJ\r\nEJBaKxxIm8YpIQKxJAVnj0ib304sKg0lPwUYcSyJ0bdxCMpZeWbGxnMhmenb\r\n/VOlt0SBp1Q9JZgUdbIor0MfWW2SZ1qi8oHlXzLcMMKu2SfVLiuNZiNRE2DI\r\nilpTiSVYLRok4p48umqJccYQuxy7N4HPIClVgOTbjC7V/DPVL5+G4v6QKiJl\r\nBh8zsuZ2JXFT+oGUJbF9DFn4cFXZV8PU/Pv7Wstf7C/3iZLn52EYcetLG5cF\r\nQLgHX0dKm5wIcNmmZ9+LQemZXpNtJj2/6N4UD/liFvbXwsTYzpo/H5acjbn6\r\nNxWSXHOgB+GibI1RJAabMnhmIiMLp6dmRn8HpDeUt/4e59x7raedVykuXneC\r\n95ySPrqo4nbjijNRnMCfzDQ2731ttiZ5QVns3h9KC0OgKg9Rlbnj3uXW5Rni\r\nIxIJrhIPUdP0lLADOlfxjc5J23SPsqgfmolHCacrGlO8qgJMOdQ2EOXhfdga\r\nXioyZHHvhi8WCEKIK6/i2jJQ6Nk1IN6Jsc/aQP/+wwC2CnpdYPGYSH8ft8Yn\r\nVAUQgI2k75DhjIw63cT/obOeLHZEGm37L8kRLo1sdOCADTmz24SwO0VkM7WU\r\ntT1V/7nwUCEQt3qkJiosQIk6u0Zax8pwzxU=\r\n=Q8rd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3we2SVRHyb/W0z11Bf6w/2ROTMDiAFGNA44vftAA0FAIgGBrcTYU6cyuiv05+6QeBpMeBYqYf9F7QaGlEDwLaatU="}]},"_npmUser":{"name":"alexkomm","email":"akommv@gmail.com"},"maintainers":[{"name":"alexkomm","email":"akommv@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twig-loader_0.4.5_1648566993646_0.7430918298387406"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-29T15:16:33.573Z","0.4.5":"2022-03-29T15:16:33.794Z","modified":"2022-04-04T12:40:59.085Z"},"maintainers":[{"name":"alexkomm","email":"akommv@gmail.com"}],"description":"Webpack loader for compiling twig.js templates","homepage":"https://github.com/alexkomm/twig-loader#readme","repository":{"type":"git","url":"git+https://github.com/alexkomm/twig-loader.git"},"author":{"name":"Mathieu Maes @ Zimmo.be"},"bugs":{"url":"https://github.com/alexkomm/twig-loader/issues"},"license":"MIT","readme":"# twig-loader [![Build Status](https://travis-ci.org/zimmo-be/twig-loader.svg)](https://travis-ci.org/zimmo-be/twig-loader)\nWebpack loader for compiling Twig.js templates. This loader will allow you to require Twig.js views to your code.\n\n## Installation\n\n`npm install twig-loader`\n\n## Usage\n\n[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html?branch=master)\n\n``` javascript\n\nmodule.exports = {\n    //...\n\n    module: {\n        rules: [\n            {\n                test: /\\.twig$/,\n                loader: \"twig-loader\",\n                options: {\n                    // See options section below\n                },\n            }\n        ]\n    },\n\n    node: {\n        fs: \"empty\" // avoids error messages\n    }\n};\n```\n\n### Options\n\n- `twigOptions`: optional; a map of options to be passed through to Twig.\n  Example: `{autoescape: true}`\n\n## Loading templates\n\n```twig\n{# File: dialog.html.twig #}\n<p>{{title}}</p>\n```\n\n```javascript\n// File: app.js\nvar template = require(\"dialog.html.twig\");\n// => returns pre-compiled template as a function and automatically includes Twig.js to your project\n\nvar html = template({title: 'dialog title'});\n// => Render the view with the given context\n\n```\n\nWhen you extend another view, it will also be added as a dependency. All twig functions that refer to additional templates are supported: import, include, extends & embed.\n\n## Changelog\n0.4.1 / 2018-06-12\n==================\n * Upgrade mocha to fix security vulnerability warning\n\n0.4.0 / 2018-05-17\n==================\n * Add ablity to pass options to twig (PR #39)\n\n0.3.1 / 2017-11-08\n==================\n * Update to Twig.js 1.10, fixes #29\n\n0.3.0 / 2017-02-19\n==================\n * replace full path with a hash and implement mapcache for id/path resolution, fixes #12\n\n0.2.4 / 2016-12-29\n==================\n * Downgrade Twig.js back to 0.8.9 because of https://github.com/twigjs/twig.js/issues/440\n\n0.2.3 / 2016-06-11\n==================\n * Improve watch operation (rebuilding of modules)\n * Refactoring so compiler and the loader are in seperate modules\n * Add Twig as peer dependency\n\n0.2.2 / 2016-06-03\n==================\n\n * Add `embed` support\n * Update Twig.js version\n\n0.2.1 / 2016-04-18\n==================\n\n* Improve `import` support (https://github.com/zimmo-be/twig-loader/pull/8)\n* Rethrow exceptions when they occur during rendering to improve testing\n\n0.2.0 / 2016-01-21\n==================\n\n* Add support for import statements (useful for Macro's)\n* Correctly resolve dependencies from include/import/extend statements with relative path support: [\\#3] and [\\#5]\n* CHANGE: No longer add the `.twig` file extension. After upgrading twig-loader, you may need to update your files and add `.twig` manually\n\n","readmeFilename":"README.md"}