Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rendrApp to the Handlebars object #1

Open
wants to merge 143 commits into
base: master
Choose a base branch
from

Conversation

azriel46d
Copy link

adding the rendrApp instance so that the instance is always available to the helpers

spikebrehm and others added 13 commits June 1, 2013 01:56
Because when it's in peerDependencies, it can't require the module
for use by the 'view' Handlebars helper.
Previously, this module was hardcoded to look for pre-compiled Handlebars templates
in `rendr.entryPath + '/app/templates/compiledTemplates'`. Now, that's the default,
but apps that use this module can manipulate the `exports.templatePatterns` array
to specify the template path patterns that match a given source file.

This is useful for when a Rendr app supports different sets of templates for different
pages; for example, an app could have a set of desktop templates and a set of
mobile templates.
0.0.6: Add support for multiple template source files.
@hurrymaplelad
Copy link
Owner

Good idea @azriel46d . https://github.com/airbnb/rendr-handlebars is the actively maintained fork. I'll update the README. Still wanna see this merged here?

@azriel46d
Copy link
Author

@hurrymaplelad just realised that i wasnt on the right fork :). As you wish, i'll add it to the other one

@spikebrehm
Copy link
Collaborator

👍 let's discuss on airbnb/rendr-handlebars. Thanks for the pull!

spikebrehm and others added 14 commits October 24, 2013 16:23
Before, `{{partial}}` was incorrectly looking for the `_app` property;
it could find it in the helper context (`this._app`), but not in the
helper options (`options.data._app`), which are utilized by block
helpers like `{{#each}}` for passing through the app context.

This adds a `getProperty(key, context, options)` method which DRYs up
that logic.

Also cleans up the context logic in `{{partial}}`.
Fix use of {{partial}} inside block helper like {{each}}
move rendr dependency to peerDependencies
removed entryPath from layoutfinder and getTemplate

ensure app is always passed in view

Added tests for multi-template-safe adapter requiring
the change to local entryPath requires the newer version of rendr
Josh Callender and others added 20 commits February 24, 2015 17:08
upgrade dependencies and fix tests that broke when upgrading chai
add version 1.0.0
added documentation for passing a model to a subview within a forEach loop
I'm making a big assumption that everyone is using
precompiled templates with this module.
Allow an instance of templateFinder to be passed in
Only ship the handlebars runtime to the client
remove handlebars as a dependency, let the app the inject it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.