{"name":"themeleon-swig","version":"1.0.0","description":"Swig mixin for Themeleon.","license":"Unlicense","author":{"name":"Valérian Galliat","url":"http://val.codejam.info/"},"contributors":[],"homepage":"https://github.com/themeleon/themeleon-swig","bugs":{"url":"https://github.com/themeleon/themeleon-swig/issues"},"repository":{"type":"git","url":"https://github.com/themeleon/themeleon-swig.git"},"dependencies":{"ap":"0.*","q":"1.*","swig":"1.*","themeleon":"1.*"},"devDependencies":{"eslint":"0.*"},"scripts":{"lint":"eslint *.js","test":"$npm_package_scripts_lint"},"gitHead":"63ec17bd8ca3f67f3110a3e53bfb1ab4f0fdb360","_id":"themeleon-swig@1.0.0","_shasum":"dec257dffc9e474cae0778b18da8840e2e0e03d8","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"valeriangalliat","email":"vava720@gmail.com"},"maintainers":[{"name":"valeriangalliat","email":"vava720@gmail.com"}],"dist":{"shasum":"dec257dffc9e474cae0778b18da8840e2e0e03d8","tarball":"http://registry-npm.ywwl.com/themeleon-swig/download/themeleon-swig-1.0.0.tgz","integrity":"sha512-T8qHI3hpWLoYbB6tDZopl4xUCqH34KPzQMCDPai3UnyBryEQEsOGJFmkA2q5WBIKJ4+A2r5I87Vv3X1GVIg3Cg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/tKTUBiEJ8EHMg1Z2XWqD7dn/vfVR+3bSO1DACXqB0QIhAPAZDuHdan4rkwYoXVXxBymNCrtqQoZZgZ5a2+ge2KAv"}],"size":1812,"noattachment":false,"key":"/themeleon-swig/-/themeleon-swig-1.0.0.tgz"},"deprecated":"This is native with Themeleon 3.0","directories":{},"readme":"Themeleon Swig\n==============\n\n> [Swig] mixin for [Themeleon].\n\n**Warning:** this repository/package is deprecated, template engines\nwill be handled by consolidate.js in Themeleon 3.0.\n\n[Swig]: https://paularmstrong.github.io/swig/\n[Themeleon]: https://github.com/themeleon/themeleon\n\nInstallation\n------------\n\nIn your `package.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"themeleon\": \"1.*\",\n    \"themeleon-swig\": \"1.*\"\n  }\n}\n```\n\nUsage\n-----\n\n```js\nvar themeleon = require('themeleon')();\n\n// Use the Swig mixin\nthemeleon.use('swig');\n\n// Or inject your own instance\nthemeleon.use('swig', require('swig'));\n\nmodule.exports = themeleon(__dirname, function (t) {\n  // Compile a Swig view as `index.html` in destination directory\n  t.swig('views/index.html.swig', 'index.html');\n});\n```\n\n### Using Twig extras\n\n```js\n// Create a local Swig instance instead of altering the globale one\nvar swig = new (require('swig').Swig)();\n\nvar extras = require('swig-extras'); // Moar filters\nvar themeleon = require('themeleon')(); // No change here\n\n// Use some additional filters\nextras.useFilter(swig, 'nl2br');\nextras.useFilter(swig, 'split');\nextras.useFilter(swig, 'trim');\nextras.useFilter(swig, 'groupby');\n\n// Even add your own filters\nswig.setFilter('push', function (arr, val) {\n  return arr.push(val);\n});\n\n// Tell Themeleon to use your own Swig instance\nthemeleon.use('swig', swig);\n```\n","publish_time":1407966524824,"_cnpm_publish_time":1407966524824,"dist-tags":{"latest":"1.0.3"}}