jonschlinkert / templates

System for creating and managing view collections, rendering, engines, routes and more. See the "dev" branch for most recent updates.
MIT License
60 stars 9 forks source link

Data from `file.data` not overriding `app.cache.data` #19

Closed dtothefp closed 8 years ago

dtothefp commented 8 years ago

I thought in the past if I did

app.data({bleep: 'bleep'})
app.onLoad(/\.html$/, (file, next) => {
  file.data = {bleep: 'bloop'}
  next(null, file);
})

that the same key on file.data would overwrite that for app.cache.data but that doesn't seem to be the case

here's an example, run node index.js

https://github.com/dtothefp/assemble-view-issue

doowb commented 8 years ago

I think I've tracked down where this can be fixed. I'll put a PR together for discussion and to determine if changes will cause breaking changes downstream.

jonschlinkert commented 8 years ago

@doowb was this resolved?

dtothefp commented 8 years ago

I think @doowb said this was resolved in assemble-core 0.16.0 but I haven't tested yet

doowb commented 8 years ago

Yes. This was resolved with the context method updates. Closing but feel free to reopen if there's still an issue.