Closed shannonmoeller closed 7 years ago
@backflip Thank you for PR #48, but I wonder if we can address this differently. I'm not a fan of the hook that would make @root
equivalent to @file.data
in some circumstances. I think I'd rather add another @
alias like @local
or @data
.
Would something like that be sufficient to solve the usecase in unic/estatico#36?
I think the real cause of this issue is in handlebars-wax
. It is overriding the meaning of @root
to be the global data, rather than the object that's passed to the template. If I don't override @root
there, this problem goes away and everything will work as expected in estatico.
This issue was addressed in handlebars-wax
and published as v5. I have pulled in this new version to gulp-hb
and published as v6.
The value of @root
should now be as @swey expected in unic/estatico#36.
The
dataEach
option was dropped when@root
and@file
were introduced. Current solution of using@file.data
seems less than ideal.https://github.com/shannonmoeller/gulp-hb/issues/10#issuecomment-275220220