Merged
Conversation
- Changed build badge branch to `develop`. - Removed Dhii standards badge.
mecha
approved these changes
Mar 14, 2020
Member
mecha
left a comment
There was a problem hiding this comment.
LGTM. Just seems to be missing some docs in the code; minor details.
Member
Author
|
Couldn't really find where the docs are missing. Could you kindly point out those places? |
mecha
suggested changes
Mar 16, 2020
Member
Author
|
@mecha, please take a look at the readme. |
XedinUnknown
commented
Apr 9, 2020
XedinUnknown
commented
Apr 9, 2020
XedinUnknown
commented
Apr 9, 2020
mecha
suggested changes
Apr 9, 2020
Member
mecha
left a comment
There was a problem hiding this comment.
Having forgotten the implementation, I read the README as a "new"-ish user wanting to learn how to use the library. Required multiple readings to get the gist of things. Here are some recommendations:
- Start off with simple things: creating a template and rendering a template. Opening with factories right off the bat is pretty disorienting. Present the reader with the bare minimum, and then build up from there.
- Demonstrate factories after point 1, showing off their benefits (like default ctx and functions).
- The bullet list under "Usage" means nothing to the reader until they read the remainder of the file. I found myself reading it and thinking "wtf are
$c,$fanduc?" - Avoid mentioning where code should be. Service definition, controller-level ... who cares?
- I'd remove unnecessary syntax like service-ish functions or immediately-invoked functions. They're not relevant to the library and just make the demonstrated code look more complex than it should be. It doesn't do the library justice.
Member
Author
|
I'll improve the docs in a different PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a template factory, which simplifies the process of creating templates for its consumers. It creates all factories with the specified evaluator implementation (through injected factory), default context, and custom functions. This allows all templates to share a common set of data, which can be overridden at render time, and of functions.