Experimental hack to unify mustache and mustache_template libraries #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for keeping the mustache/mustache_template packages going. I haven't had time to do any development on these for a while.
Here's a pull request which isn't intended for merging as-is, rather a proof of concept, to demonstrate an idea, and get feedback. (This is a 1hr hack, and I haven't even tried to run the code).
The idea is to provide a pluggable system for resolving values. And then to provide a separate dart file to import called 'mustache_with_mirrors.dart' which uses a mirrors resolver by default. The existing mustache_template code-path remains the same and does not import mirrors. Doing something like this would allow the same package to support both the mirrors, and non-mirrors approach.
I'm pretty sure there's a better way to do it this, but this was the first thing that came to mind.
Comments appreciated.
Cheers,
Greg.