{"_id":"ejs-locals","_rev":"204509","name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"time":{"modified":"2021-06-03T13:07:18.000Z","created":"2012-05-26T23:17:40.050Z","1.0.2":"2012-11-12T16:22:14.471Z","1.0.1":"2012-11-12T16:08:24.547Z","1.0.0":"2012-11-12T15:13:50.439Z","0.2.6":"2012-11-12T14:25:56.461Z","0.2.5":"2012-09-11T03:18:11.663Z","0.2.4":"2012-09-11T03:13:20.359Z","0.2.3":"2012-09-10T02:55:50.575Z","0.2.2":"2012-09-10T02:37:28.496Z","0.2.1":"2012-09-10T02:26:27.721Z","0.2.0":"2012-09-10T02:06:20.857Z","0.1.6":"2012-09-09T23:58:19.311Z","0.1.5":"2012-08-14T16:47:27.461Z","0.1.4":"2012-07-05T01:48:29.213Z","0.1.3":"2012-05-27T22:21:41.877Z","0.1.2":"2012-05-27T16:37:34.007Z","0.1.1":"2012-05-26T23:19:18.852Z","0.1.0":"2012-05-26T23:17:40.050Z"},"users":{"leesei":true,"voxpelli":true,"damocles":true,"damianof":true,"sharp":true,"ghe1219":true,"kimkee":true},"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"versions":{"1.0.2":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"1.0.2","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"0.8.x"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should -R spec"},"_id":"ejs-locals@1.0.2","dist":{"shasum":"b9b320ff6933154105fa0eed683ea64d678088ce","size":12052,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-1.0.2.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1352737334471,"_cnpm_publish_time":1352737334471,"_hasShrinkwrap":false},"1.0.1":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"1.0.1","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"0.8.x"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should -R spec"},"_id":"ejs-locals@1.0.1","dist":{"shasum":"89759bd55b2fa04c08fcec4b139abcec0c7f00c4","size":12043,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-1.0.1.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1352736504547,"_cnpm_publish_time":1352736504547,"_hasShrinkwrap":false},"1.0.0":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"1.0.0","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"0.8.x"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should -R spec"},"_id":"ejs-locals@1.0.0","dist":{"shasum":"442ee24a8458b4e5523ade227e7d78b08a59164a","size":11649,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-1.0.0.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1352733230439,"_cnpm_publish_time":1352733230439,"_hasShrinkwrap":false},"0.2.6":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.2.6","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"0.7.x"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.2.6","dist":{"shasum":"5cf4d20f604d68cd75da9bbfb35687da7f30ded2","size":11197,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.2.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.2.6.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1352730356461,"_cnpm_publish_time":1352730356461,"_hasShrinkwrap":false},"0.2.5":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.2.5","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"0.x"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.2.5","dist":{"shasum":"cb2b546cc21032358479a2af6ef67b22b509e40e","size":11131,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.2.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.2.5.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1347333491663,"_cnpm_publish_time":1347333491663,"_hasShrinkwrap":false},"0.2.4":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.2.4","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"0.x"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.2.4","dist":{"shasum":"c7a180fb9a134b32e4990fa23152afa3cbb0d818","size":11137,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.2.4.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1347333200359,"_cnpm_publish_time":1347333200359,"_hasShrinkwrap":false},"0.2.3":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.2.3","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.2.3","dist":{"shasum":"ae35dd135467893ccd3a0c83688efca81e7c3d10","size":11134,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.2.3.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1347245750575,"_cnpm_publish_time":1347245750575,"_hasShrinkwrap":false},"0.2.2":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.2.2","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.2.2","dist":{"shasum":"c37936b3c260b306b111375579c8cb6afdcebffa","size":10884,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.2.2.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1347244648496,"_cnpm_publish_time":1347244648496,"_hasShrinkwrap":false},"0.2.1":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.2.1","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.2.1","dist":{"shasum":"0fd52c7ee55f97b3d02cc1be42b5ac2bc82f961a","size":10714,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.2.1.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1347243987721,"_cnpm_publish_time":1347243987721,"_hasShrinkwrap":false},"0.2.0":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.2.0","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.2.0","dist":{"shasum":"200fecd02416217faddc6e35121b359e939551cf","size":10248,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.2.0.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1347242780857,"_cnpm_publish_time":1347242780857,"_hasShrinkwrap":false},"0.1.6":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.1.6","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.1.6","dist":{"shasum":"bb49050a1de3d0b511221f2eb48f755524646f4b","size":9896,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.1.6.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1347235099311,"_cnpm_publish_time":1347235099311,"_hasShrinkwrap":false},"0.1.5":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.1.5","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.1.5","dist":{"shasum":"57574892cb3506e5c8c6c99002439bb92e9f28b2","size":9705,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.1.5.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1344962847461,"_cnpm_publish_time":1344962847461,"_hasShrinkwrap":false},"0.1.4":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.1.4","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":">=0.6.0"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*","methods":"0.0.1"},"scripts":{"test":"mocha -r should"},"_id":"ejs-locals@0.1.4","dist":{"shasum":"dc77e190f6b9fd2ab982d9922e72c950af4d4e0a","size":9571,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.1.4.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1341452909213,"_cnpm_publish_time":1341452909213,"_hasShrinkwrap":false},"0.1.3":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.1.3","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":"~0.6.8"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*"},"scripts":{"test":"mocha -r should"},"_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"_id":"ejs-locals@0.1.3","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"de70c0c91047fd58190f96a176edfdf0a55f5b2b","size":10240,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.1.3.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1338157301877,"_cnpm_publish_time":1338157301877,"_hasShrinkwrap":false},"0.1.2":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.1.2","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":"~0.6.8"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*"},"scripts":{"test":"mocha -r should"},"_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"_id":"ejs-locals@0.1.2","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"63747aa5a4f73dbd3a5354d5875c5e164d0bf776","size":10240,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.1.2.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1338136654007,"_cnpm_publish_time":1338136654007,"_hasShrinkwrap":false},"0.1.1":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.1.1","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":"~0.6.8"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*"},"scripts":{"test":"mocha -r should"},"_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"_id":"ejs-locals@0.1.1","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"9df6b8661b68258d352e93d6b65e294128e094c9","size":10240,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.1.1.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1338074358852,"_cnpm_publish_time":1338074358852,"_hasShrinkwrap":false},"0.1.0":{"author":{"name":"Tom Carden","email":"tom@tom-carden.co.uk"},"contributors":[{"name":"Robert Sköld","email":"robert@publicclass.se","url":"http://publicclass.se"}],"name":"ejs-locals","description":"Express 3.x locals for layout, partial and blocks.","version":"0.1.0","repository":{"type":"git","url":"git://github.com/randometc/ejs-locals.git"},"homepage":"https://github.com/randometc/ejs-locals","engines":{"node":"~0.6.8"},"dependencies":{"ejs":"~0.7.1"},"devDependencies":{"express":"~3.0.0","mocha":"*","should":"*"},"scripts":{"test":"mocha -r should"},"_npmUser":{"name":"randometc","email":"tom@tom-carden.co.uk"},"_id":"ejs-locals@0.1.0","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"4f26712d241b1dc920227d25a53e59f6524cdb6a","size":10240,"noattachment":false,"key":"/ejs-locals/-/ejs-locals-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ejs-locals/download/ejs-locals-0.1.0.tgz"},"maintainers":[{"name":"randometc","email":"tom@tom-carden.co.uk"}],"directories":{},"publish_time":1338074260050,"_cnpm_publish_time":1338074260050,"_hasShrinkwrap":false}},"readme":"# ejs-locals\n\nExpress 3.x `layout`, `partial` and `block` template functions for the EJS template engine.\n\n\n## Installation\n\n    $ npm install ejs-locals --save\n\n(`--save` automatically writes to your `package.json` file, tell your friends)\n\n\n## Usage\n\nRun `node app.js` from `examples` and open `localhost:3000` to see a working example.\n\nGiven a template, `index.ejs`:\n\n    <% layout('boilerplate') -%>\n    <% script('foo.js') -%>\n    <% stylesheet('foo.css') -%>\n    <h1>I am the <%=what%> template</h1>\n    <% block('header', \"<p>I'm in the header.</p>\") -%>\n    <% block('footer', \"<p>I'm in the footer.</p>\") -%>\n\nAnd a layout, `boilerplate.ejs`:\n\n    <!DOCTYPE html>\n    <html>\n      <head>\n        <title>It's <%=who%></title>\n        <%-scripts%>\n        <%-stylesheets%>\n      </head>\n      <body>\n        <header>\n          <%-blocks.header%>\n        </header>\n        <section>\n          <%-body -%>\n        </section>\n        <footer>\n          <%-blocks.footer%>\n        </footer>\n      </body>\n    </html>\n\nWhen rendered by an Express 3.0 app:\n\n    var express = require('express')\n      , engine = require('../')\n      , app = express();\n\n    // use ejs-locals for all ejs templates:\n    app.engine('ejs', engine);\n\n    app.set('views',__dirname + '/views');\n    app.set('view engine', 'ejs'); // so you can render('index')\n\n    // render 'index' into 'boilerplate':\n    app.get('/',function(req,res,next){\n      res.render('index', { what: 'best', who: 'me' });\n    });\n\n    app.listen(3000);\n\nYou get the following result:\n\n    <!DOCTYPE html>\n    <html>\n      <head>\n        <title>It's me</title>\n        <script src=\"foo.js\"></script>\n        <link rel=\"stylesheet\" href=\"foo.css\" />\n      </head>\n      <body>\n        <header>\n          <p>I'm in the header.</p>\n        </header>\n        <section>\n          <h1>I am the best template</h1>\n        </section>\n        <footer>\n          <p>I'm in the footer.</p>\n        </footer>\n      </body>\n    </html>\n\nNote, if you haven't seen it before, this example uses trailing dashes in the EJS includes to slurp trailing whitespace and generate cleaner HTML. It's not strictly necessary.\n\n\n## Features\n\n### `layout(view)`\n\nWhen called anywhere inside a template, requests that the output of the current template be passed to the given view as the `body` local. Use this to specify layouts from within your template, which is recommended with Express 3.0, since the app-level layout functionality has been removed.\n\n### `partial(name,optionsOrCollection)`\n\nWhen called anywhere inside a template, adds the given view to that template using the current given `optionsOrCollection`. The usual way to use this is to pass an Array as the collection argument. The given view is then executed for each item in the Array; the item is passed into the view as a local with a name generated from the view's filename.\n\nFor example, if you do `<%-partial('thing',things)%>` then each item in the `things` Array is passed to `thing.ejs` with the name `thing`. If you rename the template, the local name of each item will correspond to the template name.\n\n### `include(view)`\n\nWhen called anywhere inside a template, adds the given view to that template using the current options and locals. e.g. `<%-include('view.ejs')%>\n\n### `block(name,html)`\n\nWhen called anywhere inside a template, adds the given html to the named block. In the layout you can then do `<%-block('foo')%> to render all the html for that block.\n\nSince this relies on javascript strings, and bypasses EJS's default escaping, you should be very careful if you use this function with user-submitted data.\n\n### `script(src,type)`\n\nA convenience function for `block('scripts', '<script src=\"src.js\"></script>')` with optional type. When called anywhere inside a template, adds a script tag with the given src/type to the scripts block. In the layout you can then do `<%-scripts%> to output the scripts from all the child templates.\n\n### `stylesheet(href,media)`\n\nA convenience function for `block('stylesheets', '<link rel=\"stylesheet\" href=\"href.css\" />')` with optional media type. When called anywhere inside a template, adds a link tag for the stylesheet with the given href/media to the stylesheets block. In the layout you can then do `<%-stylesheets%> to output the links from all the child templates.\n\n\n## Template Support\n\n  - `ejs` (actually hard coded right now, but feel free to __fork and help!__)\n\n\n## TODO\n\n - More Tests!\n - More templates.\n - Better, safer (autoescaped) syntax for longer blocks\n\n\n## Running Tests\n\nTo run the test suite first invoke the following command within the repo, installing the development dependencies:\n\n    $ npm install -d\n\nthen run the tests:\n\n    $ npm test\n\n\n## Backwards Compatibility\n\nExpress 2.0 had similar functionality built in, using `{ layout: 'view' }` as an argument to  `res.render` but this has been removed in Express 3.0. If you want the old behavior you should do:\n\n    app.locals({\n      _layoutFile: true\n    })\n\n\nAnd/or pass `_layoutFile: true` in the options when you call `res.render(...)`.\n\n\n## Credits\n\nThis library is a fork from Robert Sk&ouml;ld's [express-partials](https://github.com/publicclass/express-partials), and the partial function remains relatively untouched from there (aside from cache support).\n\nThe blocks idea and syntax comes from Aseem Kishore's [express-blocks](https://github.com/aseemk/express-blocks)\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2012 Robert Sk&ouml;ld &lt;robert@publicclass.se&gt;\nCopyright (c) 2012 Tom Carden &lt;tom@tom-carden.co.uk&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/randometc/ejs-locals"}