Skip to content

Add rendrApp to the Handlebars object - #1

Open
azriel46d wants to merge 143 commits into
hurrymaplelad:masterfrom
rendrjs:master
Open

Add rendrApp to the Handlebars object#1
azriel46d wants to merge 143 commits into
hurrymaplelad:masterfrom
rendrjs:master

Conversation

@azriel46d

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.