jsrender, templates, assets, etc.

I want to use jsrender and jsviews in a Rails 3 project. I want to think of the templates as "assets" and manage them via sprockets. This implies that a Tilt compatible template engine is needed. I'm wondering if anyone is already working on this concept.

If no one is already working on this -- then any suggestions on how to make it easy to use, Rails 3-like, convenient for debugging in development mode, and efficient in production made would be much appreciated.

The tutorial by John Papa uses external templates but only in a one shot fashion. I don't want to go fetch all my template files separately when in production. Just as all the javascript and all the css files are served up as one concatenated file, I'd like to serve all the templates up as one file when in production mode.

Thank you for your time, Perry Smith

I had a similar problem, where I found the presented solutions to handling external templates for jsRender to be lacking. I created a js library to help facilitate adding external files to an html page. Note that this library will work with any templating engine, not just jsRender. I would like you to take a look and see if that helps your problem; if not, maybe I could extend what I already have to make it more useful.

https://github.com/stevenmtwhunt/rendertmpl

Thanks!

Steven Hunt

Steven H. wrote in post #1075682:

I had a similar problem, where I found the presented solutions to handling external templates for jsRender to be lacking. I created a js library to help facilitate adding external files to an html page. Note that this library will work with any templating engine, not just jsRender. I would like you to take a look and see if that helps your problem; if not, maybe I could extend what I already have to make it more useful.

https://github.com/stevenmtwhunt/rendertmpl

Thanks!

Steven Hunt

Update: I went ahead and added multi-part template files to my library. Let me know if that will suffice.

Steven

Sorry to post again here, but I recently changed the project name on github so that the name better reflected the purpose of the library:

https://github.com/stevenmtwhunt/tmpl.loader