tj / co-views

Higher-level template rendering for node.js using generators
173 stars 24 forks source link

locals can be passed as `views` opts #15

Closed xpepermint closed 9 years ago

xpepermint commented 10 years ago

With this commit locals can be sent like this:

var views = require('../../co-views');
module.exports = views(__dirname+'/../app/views', {
  map: { ... },
  locals: { ... } // this is needed for flexibility
});

This update also solves this proposal: https://github.com/visionmedia/co-views/pull/14 Please accept and merge. Thanks.

haoxins commented 9 years ago

2f57d2c50c2c32dd24aa4d3f0fb677876a1b0209

land in 0.3.0