{"_id":"swig-templates","_rev":"17-deffe24ecffc4dbd801872736d205778","name":"swig-templates","description":"A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig.","dist-tags":{"latest":"2.0.3"},"versions":{"2.0.0":{"name":"swig-templates","version":"2.0.0","description":"A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig.","keywords":["template","templating","html","django","jinja","twig","express","block"],"repository":{"type":"git","url":"git+ssh://git@github.com/node-swig/swig-templates.git"},"dependencies":{"uglify-js":"2.4.24","optimist":"~0.6"},"devDependencies":{"blanket":"~1.1","browserify":"~2","eslint":"^2.2.0","expect.js":"~0.2","express":"~3","file":"~0.2","git-validate":"^2.1.4","jsdoc":"3.2.0","less":"~1.4","lodash":"~1.3.1","mocha":"1.12.0","mocha-phantomjs":"~3.1","phantomjs":"~1.9.1","rimraf":"^2.5.2","still":"0.0.7","travis-cov":"~0.2"},"license":"MIT","main":"index","engines":{"node":">=0.10.0"},"bin":{"swig":"./bin/swig.js"},"scripts":{"prepublish":"npm prune && make build","test":"make test reporter=spec && make test-browser && make coverage cov-reporter=travis-cov","lint":"make lint","validate":"npm ls"},"config":{"blanket":{"pattern":"swig/lib"}},"bugs":{"url":"https://github.com/node-swig/swig-templates/issues"},"pre-commit":["validate","lint","test"],"gitHead":"f7aebf8b0e420e11b3ccbecc49019029b9f4e354","homepage":"https://github.com/node-swig/swig-templates#readme","_id":"swig-templates@2.0.0","_shasum":"f629072b11bb360e0eb5e17e57776adb5a2d0f0e","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"cdaringe","email":"cdaringe@gmail.com"},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"}],"dist":{"shasum":"f629072b11bb360e0eb5e17e57776adb5a2d0f0e","tarball":"https://registry.npmjs.org/swig-templates/-/swig-templates-2.0.0.tgz","integrity":"sha512-soYOUSZ76YT0eNri78amoJILlB9LCAEuzLftRpCXEy+TEf6DN3IjkI75Xpxuhwc7qqVRlWcRtmT4A3w0JiKJew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGI98ktfBU6F05J10KilpgJcS77QEw3c6CJ/tfzbefKpAiAG5B7Vre1KD2aXmOjVChvjUTrq+APu9GeJhs9aYlI40w=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/swig-templates-2.0.0.tgz_1460080882742_0.842849361943081"},"directories":{},"deprecated":"unmaintained"},"2.0.1":{"name":"swig-templates","version":"2.0.1","description":"A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig.","keywords":["template","templating","html","django","jinja","twig","express","block"],"repository":{"type":"git","url":"git+ssh://git@github.com/node-swig/swig-templates.git"},"dependencies":{"uglify-js":"2.4.24","optimist":"~0.6"},"devDependencies":{"blanket":"~1.1","browserify":"~2","eslint":"^2.2.0","expect.js":"~0.2","express":"~3","file":"~0.2","git-validate":"^2.1.4","jsdoc":"3.2.0","less":"~1.4","lodash":"~1.3.1","mocha":"1.12.0","mocha-phantomjs":"~3.1","phantomjs":"~1.9.1","rimraf":"^2.5.2","still":"0.0.7","travis-cov":"~0.2"},"license":"MIT","main":"index","engines":{"node":">=0.10.0"},"bin":{"swig":"./bin/swig.js"},"scripts":{"prepublish":"npm prune && make build","test":"make test reporter=spec && make test-browser && make coverage cov-reporter=travis-cov","lint":"make lint","validate":"npm ls"},"config":{"blanket":{"pattern":"swig/lib"}},"bugs":{"url":"https://github.com/node-swig/swig-templates/issues"},"pre-commit":["validate","lint","test"],"gitHead":"3c7638873cd92f1ed8c4db49e31aeb53f72181be","homepage":"https://github.com/node-swig/swig-templates#readme","_id":"swig-templates@2.0.1","_shasum":"a090b280160233be4d395ead3d7a180e91d92732","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"cdaringe","email":"cdaringe@gmail.com"},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"}],"dist":{"shasum":"a090b280160233be4d395ead3d7a180e91d92732","tarball":"https://registry.npmjs.org/swig-templates/-/swig-templates-2.0.1.tgz","integrity":"sha512-FTy2dWl0zxa8Nk7w1J1GJ6iZY9WxkH8uv4nYySBysl3yKz6JJXEEdSTXZoQaF5VnT1xovFtate9C7U8w1WxcVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0WEWAmd6q+byklagtdBU4bhzOkvuT4DTVv9KgV9JYhAiAZkku+I/jlQWKFXHoF0ZPIAw8jSsL8iJtRy5+eLigRVA=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/swig-templates-2.0.1.tgz_1460081221691_0.2171018929220736"},"directories":{},"deprecated":"unmaintained"},"2.0.2":{"name":"swig-templates","version":"2.0.2","description":"A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig.","keywords":["template","templating","html","django","jinja","twig","express","block"],"repository":{"type":"git","url":"git+ssh://git@github.com/node-swig/swig-templates.git"},"dependencies":{"uglify-js":"2.6.0","optimist":"~0.6"},"devDependencies":{"blanket":"~1.1","browserify":"~2","eslint":"^2.2.0","expect.js":"~0.2","express":"~3","file":"~0.2","git-validate":"^2.1.4","jsdoc":"3.2.0","less":"~1.4","lodash":"~1.3.1","mocha":"1.12.0","mocha-phantomjs":"~3.1","phantomjs":"~1.9.1","rimraf":"^2.5.2","still":"0.0.7","travis-cov":"~0.2"},"license":"MIT","main":"index","engines":{"node":">=0.10.0"},"bin":{"swig":"./bin/swig.js"},"scripts":{"prepublish":"npm prune && make build","test":"make test reporter=spec && make test-browser && make coverage cov-reporter=travis-cov","lint":"make lint","validate":"npm ls"},"config":{"blanket":{"pattern":"swig-templates/lib"},"travis-cov":{"threshold":95}},"bugs":{"url":"https://github.com/node-swig/swig-templates/issues"},"pre-commit":["validate","lint","test"],"gitHead":"7a0b2ee4adac5faff774b439e3729c4e74ae8a94","homepage":"https://github.com/node-swig/swig-templates#readme","_id":"swig-templates@2.0.2","_shasum":"d2502a7303019356f4ea76ea9065d4f58af6ab75","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"cdaringe","email":"cdaringe@gmail.com"},"dist":{"shasum":"d2502a7303019356f4ea76ea9065d4f58af6ab75","tarball":"https://registry.npmjs.org/swig-templates/-/swig-templates-2.0.2.tgz","integrity":"sha512-FZa9YyrzVWz9NkUHy+W3zBGv8wxhHkgSjGpzNVrPdrGrxPQF0sg81X+k+nI6EZHw0TRiHtE8KtKb30NW33zACw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKppl6AakFBqgxd02SegaKymgu2P7jM/u8qNif/LZ33AiB4kx9tMgX02AuJ502J+ezJ+DIji+KSbSAUcUDMVZXt/g=="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"lochlan","email":"lochlan.mcintosh@gmail.com"},{"name":"paulcpederson","email":"paul.c.pederson@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/swig-templates-2.0.2.tgz_1475253529792_0.04133488214574754"},"directories":{},"deprecated":"unmaintained"},"2.0.3":{"name":"swig-templates","version":"2.0.3","description":"A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig.","keywords":["template","templating","html","django","jinja","twig","express","block"],"repository":{"type":"git","url":"git+https://github.com/node-swig/swig-templates.git"},"dependencies":{"optimist":"~0.6","uglify-js":"2.6.0"},"devDependencies":{"@commitlint/cli":"^7.0.0","@commitlint/config-conventional":"^7.0.1","@commitlint/travis-cli":"^7.0.0","blanket":"~1.1","browserify":"~2","copyfiles":"^1.0.0","expect.js":"~0.2","express":"~3","file":"~0.2","git-validate":"^2.1.4","husky":"^0.14.3","jsdoc":"3.4.0","less":"~1.4","lint-staged":"^7.2.2","live-server":"^1.1.0","lodash":"~1.3.1","mocha":"^5.2.0","mocha-chrome":"^1.1.0","npm-run-all":"^4.1.3","parallelshell":"^2.0.0","prettier-standard":"^8.0.1","rerun-script":"^0.6.0","rimraf":"^2.5.2","semantic-release":"^15.9.8","standard":"^11.0.1","static-site":"^1.3.1","travis-cov":"~0.2"},"license":"MIT","main":"index","engines":{"node":">=0.10.0"},"bin":{"swig":"./bin/swig.js"},"scripts":{"commitmsg":"commitlint -E GIT_PARAMS","copy":"copyfiles -u 1 'docs/**/*.{ico,css,js}' build/","docs":"parallelshell 'live-server build/' 'rerun-script'","html":"static-site -s docs -b build","jsdoc:swig":"jsdoc lib/swig.js -X > docs/data/api.json","jsdoc:filters":"jsdoc lib/filters.js -X > docs/data/filters.json","jsdoc:tags":"jsdoc lib/tags/ -X > docs/data/tags.json","jsdoc:loaders":"jsdoc lib/loaders/ -X > docs/data/loaders.json","jsdoc:parser":"jsdoc lib/parser.js lib/lexer.js -X > docs/data/extending.json","jsdoc":"run-s jsdoc:swig jsdoc:filters jsdoc:tags jsdoc:loaders jsdoc:parser","lint":"standard 'lib/**/*.js' 'tests/**/*.js' 'scripts/**/*.js'","predocs":"run-s jsdoc copy html","test":"make test reporter=spec && make test-browser && make coverage cov-reporter=travis-cov","semantic-release":"semantic-release","format":"prettier-standard 'lib/**/*.js' 'tests/**/*.js' 'scripts/**/*.js'","precommit":"lint-staged"},"watches":{"copy":"docs/**/*.{ico,css,js}","html":["docs/**/*.{html,json}","source/_helpers/**"],"jsdoc":"lib/**/*.js"},"config":{"blanket":{"pattern":["swig-templates/lib"]},"travis-cov":{"threshold":95}},"bugs":{"url":"https://github.com/node-swig/swig-templates/issues"},"standard":{"env":["mocha"],"ignore":["docs","dist","tmp","examples"]},"lint-staged":{"linters":{"lib/**/*.js":["prettier-standard","git add"],"tests/**/*.js":["prettier-standard","git add"],"scripts/**/*.js":["prettier-standard","git add"]}},"gitHead":"6209307105f609a54bdbbee4ca0cc156991a521c","homepage":"https://github.com/node-swig/swig-templates#readme","_id":"swig-templates@2.0.3","_npmVersion":"6.3.0","_nodeVersion":"8.11.3","_npmUser":{"name":"wa11-e","email":"wa11edevbot@gmail.com"},"dist":{"integrity":"sha512-QojPTuZWdpznSZWZDB63/grsZuDwT/7geMeGlftbJXDoYBIZEnTcKvz4iwYDv3SwfPX9/B4RtGRSXNnm3S2wwg==","shasum":"6b4c43b462175df2a8da857a2043379ec6ea6fd0","tarball":"https://registry.npmjs.org/swig-templates/-/swig-templates-2.0.3.tgz","fileCount":36,"unpackedSize":438876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbccumCRA9TVsSAnZWagAAD3UQAIdMMFf757dkmsVGh23Z\npFDaIqBZMPh2t/ttEKz2V08v0AzfJP/6P75gCaPO7WisVJsIfDIjfYmpDrgd\nQ8GKMHPSqWMH6WK6y6Tk4u/12c5/PQ/wTZIqAHvQ45uKl+Awq2MOB1G2BzQ2\nnOxG5MVGJJKAmh++7S3AsOiPLdip96ByZFxJX7V9wvJO4gNzeHnO5TQF4obJ\nWyWQUdldu2z7/zL8chLV8QfKgwkXBOFEQcDgkgF+hHZ433eBn9Gjhb21lxBC\nEJDjZ8a0ACx/1GgNs3lhpbQwUUIVEiMdwA0A7EpYh7IWywnC9R2ljaU7/0Ob\nEHgsyuuSh906UZ2mLknrEe4o8AqPGHiufJRF71LKzf8vySEWQVoIL3DA3Bcn\n7mBP6UAvmVMvEN7ueEwSKzP+1pClz/LOHk0p/DqHaO+HdJ1iQA1Hh7Rwhkqn\nVzNorBefZDBbHk7iFq89nyOHmRtY0JkYNC0ZiNuJqZi80Hvw1TBahXdZ8Wjo\nS9yRIokcr4JXh+VdtonAO1RFxMYiMu92lgmraJHmTln/fbaEB4HFCEPWKmPi\nLuHmymlUa1ApJ5r8PC0DqKbGOGxd0xeoE2PIBd4PGgGo8i78TOR8anS14Xum\n3mcvtwB8AUG71qM+VKgxSXCtKYrb1BDfI02tkRzQOtNlnK5zfLber5/yrFgQ\n+c1z\r\n=x6c/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVyNthfaRWYAvMO4dFwG1QqhzYHuoM6fIzPXNTzMgrBQIgDE1Q7mc4UvajFaUJK2uHTjH8LbkFYDuwsnBWvhj9Vjw="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"lochlan","email":"lochlan.mcintosh@gmail.com"},{"name":"paulcpederson","email":"paul.c.pederson@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/swig-templates_2.0.3_1534184357857_0.8400520533800628"},"_hasShrinkwrap":false,"deprecated":"unmaintained"}},"readme":"# swig\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n [![Build Status](http://img.shields.io/travis/node-swig/swig-templates/master.svg?style=flat)](http://travis-ci.org/node-swig/swig-templates) [![NPM version](http://img.shields.io/npm/v/swig-templates.svg?style=flat)](https://www.npmjs.org/package/swig-templates) [![NPM Downloads](http://img.shields.io/npm/dm/swig-templates.svg?style=flat)](https://www.npmjs.org/package/swig-templates) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n\n[Swig](http://node-swig.github.io/swig-templates/) is an awesome, Django/Jinja-like template engine for node.js.\n\n#### seeking maintainers\nPaul Armstrong has [stepped down](https://web.archive.org/web/20160311170700/https://github.com/paularmstrong/swig/issues/628) as the primary swig maintainer.  Swig is a phenominal project and a template engine that quitely, but strongly, stands tall against the others in a domain full of template engines.  If you are interested in being a collaborator, check out the issues page, and let's discuss how to proceed.  Don't forget to thank Paul and previous swig collabs for their hard and excellent work!\n\nFeatures\n--------\n\n* Available for node.js **and** major web browsers!\n* [Express](http://expressjs.com/) compatible.\n* Object-Oriented template inheritance.\n* Apply filters and transformations to output in your templates.\n* Automatically escapes all output for safe HTML rendering.\n* Lots of iteration and conditionals supported.\n* Robust without the bloat.\n* Extendable and customizable. See [Swig-Extras](https://github.com/paularmstrong/swig-extras) for some examples.\n* Great [code coverage](http://node-swig.github.io/swig-templates/coverage.html).\n\nNeed Help? Have Questions? Comments?\n------------------------------------\n\n* [Mailing List/Google Group](http://groups.google.com/forum/#!forum/swig-templates)\n* [StackOverflow](http://stackoverflow.com/questions/tagged/swig-template)\n* [Migration Guide](https://github.com/node-swig/swig-templates/wiki/Migrating-from-v0.x.x-to-v1.0.0)\n\nInstallation\n------------\n\n    npm install swig-templates\n\nDocumentation\n-------------\n\nAll documentation can be viewed online on the [Swig Website](http://node-swig.github.io/swig-templates/).\n\nBasic Example\n-------------\n\n### Template code\n\n```html\n<h1>{{ pagename|title }}</h1>\n<ul>\n{% for author in authors %}\n    <li{% if loop.first %} class=\"first\"{% endif %}>{{ author }}</li>\n{% endfor %}\n</ul>\n```\n\n### node.js code\n\n```js\nvar swig  = require('swig-templates');\nvar template = swig.compileFile('/absolute/path/to/template.html');\nvar output = template({\n    pagename: 'awesome people',\n    authors: ['Paul', 'Jim', 'Jane']\n});\n```\n\n### Output\n\n```html\n<h1>Awesome People</h1>\n<ul>\n    <li class=\"first\">Paul</li>\n    <li>Jim</li>\n    <li>Jane</li>\n</ul>\n```\n\nFor working example see [examples/basic](https://github.com/node-swig/swig-templates/tree/master/examples/basic)\n\nHow it works\n------------\n\nSwig reads template files and translates them into cached javascript functions. When we later render a template we call the evaluated function, passing a context object as an argument.\n\nLicense\n-------\n\nCopyright (c) 2010-2013 Paul Armstrong\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"lochlan","email":"lochlan.mcintosh@gmail.com"},{"name":"paulcpederson","email":"paul.c.pederson@gmail.com"}],"time":{"modified":"2023-02-03T19:28:42.054Z","created":"2016-04-08T02:01:23.317Z","2.0.0":"2016-04-08T02:01:23.317Z","2.0.1":"2016-04-08T02:07:04.215Z","2.0.2":"2016-09-30T16:38:50.059Z","2.0.3":"2018-08-13T18:19:17.978Z"},"homepage":"https://github.com/node-swig/swig-templates#readme","keywords":["template","templating","html","django","jinja","twig","express","block"],"repository":{"type":"git","url":"git+https://github.com/node-swig/swig-templates.git"},"bugs":{"url":"https://github.com/node-swig/swig-templates/issues"},"license":"MIT","readmeFilename":"README.md","users":{"steevhise":true,"liujingbreak":true,"jakub.knejzlik":true,"maoizm":true,"chinawolf_wyp":true,"alien":true,"wuzht":true}}