This addresses #19 and also passes current and new tests.
This changes the signature of app.context to pass the view in as the first parameter. This let's us by default to do the following for merging context:
var ctx = utils.merge({}, app.cache.data, view.locals, view.data, locals);
It also lets the user override all the functionality with the options.context function:
This addresses #19 and also passes current and new tests. This changes the signature of
app.context
to pass theview
in as the first parameter. This let's us by default to do the following for merging context:It also lets the user override all the functionality with the
options.context
function:I think this is the correct way to merge context, but I wanted to open a PR for discussion. This will need to be updated in
assemble-render-file
too.