{"name":"themeleon-swig","version":"1.0.1","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":"4c83efa17103129b6126a9d4bae3bc1123c29c02","_id":"themeleon-swig@1.0.1","_shasum":"9c3daeeb462a5147d7f03eac13adc585dfb1f9ae","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"valeriangalliat","email":"vava720@gmail.com"},"maintainers":[{"name":"valeriangalliat","email":"vava720@gmail.com"}],"dist":{"shasum":"9c3daeeb462a5147d7f03eac13adc585dfb1f9ae","tarball":"http://registry-npm.ywwl.com/themeleon-swig/download/themeleon-swig-1.0.1.tgz","integrity":"sha512-Fnxpnq2YQt9gcL/7JMV7PvvVWViixSECYvAXji1U3rQOIRy2bugHvdYFLWHbqfd8sC2PmRnVvCXKi7/aimgPtw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcJWaOgng7V5uh2AfnHRrI44Cho7+9xSbol9sGgNHBLgIgP8INfAwcG8Qu9PgLUb0bk8aiBdo6Kf9p3ZrLNgVyjhg="}],"size":1807,"noattachment":false,"key":"/themeleon-swig/-/themeleon-swig-1.0.1.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":1407966578794,"_cnpm_publish_time":1407966578794,"dist-tags":{"latest":"1.0.3"}}