Skip to content

Engine initialization.#37

Merged
jagoda merged 1 commit intohapijs:masterfrom
jagoda:feat-engine-init
Aug 16, 2015
Merged

Engine initialization.#37
jagoda merged 1 commit intohapijs:masterfrom
jagoda:feat-engine-init

Conversation

@jagoda
Copy link
Copy Markdown
Contributor

@jagoda jagoda commented Jul 30, 2015

Some view engines (i.e. Nunjucks) rely on the manager configuration
and other state in order to render templates. This change provides
a convenience method to allow engines to initialize any additional
state and to update the engine configuration accordingly.

@jagoda jagoda added the feature New functionality or improvement label Jul 30, 2015
@jagoda jagoda self-assigned this Jul 30, 2015
@jagoda jagoda added this to the 3.0.0 milestone Jul 30, 2015
@jagoda jagoda force-pushed the feat-engine-init branch from b2a0e67 to 4305ca4 Compare August 1, 2015 14:22
README.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always blocking?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no reason that it needs to be -- I just didn't have an async example on hand. I'm happy to rework it to be optionally async (and admittedly more consistent with the rest of the API). This seems to suggest a prepareMode option if it is going to parallel the compile function. Do you have any thoughts on this approach?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compile mode was added for backwards compatibility issues. I would just do it async style and be done.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, will do. Thanks for the input!

@jagoda
Copy link
Copy Markdown
Contributor Author

jagoda commented Aug 15, 2015

@hueniverse I'm about ready to wrap this up. However, it looks like I'm not on the list of maintainers in NPM. Would you mind adding me to that so that I can publish 3.0.0 after merging this?

Some view engines (i.e. Nunjucks) rely on the manager configuration
and other state in order to render templates. This change provides
a convenience method to allow engines to initialize any additional
state and to update the engine configuration accordingly.
@hueniverse
Copy link
Copy Markdown
Contributor

Done

@jagoda
Copy link
Copy Markdown
Contributor Author

jagoda commented Aug 16, 2015

Awesome. Thanks!

jagoda added a commit that referenced this pull request Aug 16, 2015
@jagoda jagoda merged commit 20c0d0a into hapijs:master Aug 16, 2015
@jagoda jagoda deleted the feat-engine-init branch August 16, 2015 01:59
@lock
Copy link
Copy Markdown

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants