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

Wrap Handlebars in a template adapter, Part II #56

Merged
merged 17 commits into from
Jun 29, 2013
Merged

Conversation

spikebrehm
Copy link
Member

This is an evolution of #19. Unfortunately had to open a new PR because I couldn't push commits to @hurrymaplelad's branch (or my Git-fu isn't that strong).

I think this is all ready to go. It uses airbnb/rendr-handlebars (forked from @hurrymaplelad). I've simplified its API so that instead of:

this.app.templateFinder.getTemplate(templateName);
this.app.layoutFinder.getTemplate(layoutName);

we have:

this.app.templateAdapter.getTemplate(templateName);
this.app.templateAdapter.getLayout(layoutName);

Before we merge into airbnb/rendr, we need to figure out how to properly package the client-side files for an app, which I'm proof-of-concepting with airbnb/rendr-app-template (view the template-adapter branch). It works fine server-side, however because we're using Stitch to package for the client, we'll have to do something like use Grunt+Browserify to compile a client-side dist file, because Stitch doesn't automatically package up the module graph. This is another reason to switch to Browserify from Stitch, but that may be a lot more work.

@hurrymaplelad
Copy link
Contributor

I think we can move forward without solving packaging. Seems like another big open question. Would be nice to keep both discussions moving.

@spikebrehm, you okay with requiring a few extra lines in project build files while #35 gets sorted out, or would you rather wait and release a polished build interface?

@spikebrehm
Copy link
Member Author

@hurrymaplelad so sorry for waiting FOREVER to get this merged in! I was finally able to give it a test locally, and it works beautifully. Will merge now.

@spikebrehm
Copy link
Member Author

I just first want to make sure that it's still easy to add custom Handlebars helpers in rendr-app-template.

spikebrehm pushed a commit that referenced this pull request Jun 29, 2013
Wrap Handlebars in a template adapter, Part II
@spikebrehm spikebrehm merged commit e866ae8 into master Jun 29, 2013
@spikebrehm spikebrehm deleted the template-adapter branch June 29, 2013 02:05
@jeffyip
Copy link

jeffyip commented Jun 29, 2013

👍

bigethan pushed a commit to bigethan/rendr that referenced this pull request Oct 16, 2013
Wrap Handlebars in a template adapter, Part II
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.

3 participants