handlebars.scala icon indicating copy to clipboard operation
handlebars.scala copied to clipboard

fix issue #49

Open tomatohf opened this issue 10 years ago • 11 comments

Hi Mark,

We have used your great Scala implementation of Handlebars in our product qiaobutang.com , and we'd like to join to make it better ~ :-)

BTW, it's glad to extend the Binding interface, we implemented a new Binding to fill json format values and avoid runtime reflection.

tomatohf avatar Apr 08 '15 08:04 tomatohf

@tomatohf I'm glad to hear you used the Binding interface; I was responsible for those changes and have recently submitted a pull-request to include my play-json integration: https://github.com/SpinGo/handlebars.scala/commit/4a7483460122bfab30fac8a5d1b3340d08f599d7

With which JSON library did you integrate?

Being able to bind to a JSON AST allowed us to seamlessly render handlebars templates in both JS land and Scala land, and it worked out relatively well.

Nice catch on your fix, BTW.

timcharper avatar Aug 10 '15 06:08 timcharper

@timcharper We integrated lift-json. And we are also using handlebars as templates in both JS and Scala.

tomatohf avatar Aug 29 '15 05:08 tomatohf

Great; do you have the code somewhere? I could help review it and get it ready for merge. The play-json integration was merged into handlebars primary.

timcharper avatar Aug 29 '15 05:08 timcharper

I have the code in our private github repository. It seems there would be another pull request ? If so, could you please point me out where to put the code. Or, other way preferred?

tomatohf avatar Sep 01 '15 14:09 tomatohf

You could just post a gist

Sent from my iPhone

On Sep 1, 2015, at 08:18, Tomato [email protected] wrote:

I have the code in our private github repository. It seems there would be another pull request ? If so, could you please point me out where to put the code. Or, other way preferred?

— Reply to this email directly or view it on GitHub.

timcharper avatar Sep 01 '15 14:09 timcharper

I just found play-json under the addon folder ...

tomatohf avatar Sep 01 '15 14:09 tomatohf

ok, I will add a gist

tomatohf avatar Sep 01 '15 14:09 tomatohf

Here it is => https://gist.github.com/tomatohf/e54bc169da2a2425343f

tomatohf avatar Sep 01 '15 14:09 tomatohf

Well, lol here we are 5 months later!

I merged your gist and made a few modifications to it; it's here: https://github.com/mwunsch/handlebars.scala/tree/lift-json

Could you write some tests for it? Just mimic the tests for the play-json bindings. Then we'll be good to merge it in.

Thanks!

timcharper avatar Feb 11 '16 06:02 timcharper

Sure, I'm glad to add some tests just like what play-json bindings does in addons directory. While would it be better do that in a new pull request based on the lift-json branch?

tomatohf avatar Feb 19 '16 07:02 tomatohf

@tomatohf sure! Pull request to lift-json branch would be optimal. Or, you could just amend the commit from the lift-json branch and send a pull request for master.

timcharper avatar Feb 21 '16 00:02 timcharper