handlebars example?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

handlebars example?

geemang
I'm trying to use the handlebars.java renderer.   I'm following the docs:
http://www.ratpack-framework.org/manual/current/api/org/ratpackframework/handlebars/HandlebarsModule.html

Is there a working example and /or docs for this?

I'm assuming the handlebars module isn't being included as part of the the org.ratpack-framework:ratpack-gradle:0.9.0-SNAPSHOT. Is it supposed to???

I get the following classpath issues:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
ratpack.groovy: 3: unable to resolve class org.ratpackframework.handlebars.HandlebarsModule
 @ line 3, column 1.
   import org.ratpackframework.handlebars.HandlebarsModule
   ^

ratpack.groovy: 4: unable to resolve class org.ratpackframework.handlebars.Template
 @ line 4, column 1.
   import static org.ratpackframework.handlebars.Template.handlebarsTemplate
Reply | Threaded
Open this post in threaded view
|

Re: handlebars example?

Marcin Erdmann
You need to add the following dependency to your gradle script:

dependencies {
    compile ''org.ratpack-framework:ratpack-handlebars:0.9.0-SNAPSHOT"
}


On Tue, Sep 17, 2013 at 9:03 PM, geemang [via Ratpack Forum] <[hidden email]> wrote:
I'm trying to use the handlebars.java renderer.   I'm following the docs:
http://www.ratpack-framework.org/manual/current/api/org/ratpackframework/handlebars/HandlebarsModule.html

Is there a working example and /or docs for this?

I'm assuming the handlebars module isn't being included as part of the the org.ratpack-framework:ratpack-gradle:0.9.0-SNAPSHOT. Is it supposed to???

I get the following classpath issues:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
ratpack.groovy: 3: unable to resolve class org.ratpackframework.handlebars.HandlebarsModule
 @ line 3, column 1.
   import org.ratpackframework.handlebars.HandlebarsModule
   ^

ratpack.groovy: 4: unable to resolve class org.ratpackframework.handlebars.Template
 @ line 4, column 1.
   import static org.ratpackframework.handlebars.Template.handlebarsTemplate


If you reply to this email, your message will be added to the discussion below:
http://forum.ratpack-framework.org/handlebars-example-tp156.html
To start a new topic under Ratpack Forum, email [hidden email]
To unsubscribe from Ratpack Forum, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: handlebars example?

geemang
Thanks!  Will this become part of the core?
Reply | Threaded
Open this post in threaded view
|

Re: handlebars example?

Marcin Erdmann
No, this will never become part of the core per se, but it's like a core plugin (ratpack-jackson being another example, see modules as plugins in the manual http://www.ratpack-framework.org/manual/current/guice.html#modules_as_plugins). Core plugins are submodules inside of Ratpack's repository(https://github.com/ratpack/ratpack). It's just that Ratpack aims at being very modular and you have to explictly opt-in for anything that is not essential.


On Tue, Sep 17, 2013 at 11:07 PM, geemang [via Ratpack Forum] <[hidden email]> wrote:
Thanks!  Will this become part of the core?


If you reply to this email, your message will be added to the discussion below:
http://forum.ratpack-framework.org/handlebars-example-tp156p158.html
To start a new topic under Ratpack Forum, email [hidden email]
To unsubscribe from Ratpack Forum, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: handlebars example?

geemang
Makes good sense!  

Do you have a sample project that is using this module?  

Would save me a some time, if I could copy some stuff to get rolling.

Cheers,
Martin

Reply | Threaded
Open this post in threaded view
|

Re: handlebars example?

Marcin Erdmann
I think that you're the first person actually trying it out. The only help I can offer is the javadoc for HandlebarsModule and the tests: https://github.com/ratpack/ratpack/blob/master/ratpack-handlebars/src/test/groovy/org/ratpackframework/handlebars/HandlebarsTemplateRenderingSpec.groovy


On Tue, Sep 17, 2013 at 11:22 PM, geemang [via Ratpack Forum] <[hidden email]> wrote:
Makes good sense!  

Do you have a sample project that is using this module?  

Would save me a some time, if I could copy some stuff to get rolling.

Cheers,
Martin




If you reply to this email, your message will be added to the discussion below:
http://forum.ratpack-framework.org/handlebars-example-tp156p160.html
To start a new topic under Ratpack Forum, email [hidden email]
To unsubscribe from Ratpack Forum, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: handlebars example?

geemang
No problem. Making progress by following your test spec.