Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Same here. I've been trying out the 3.1 RCs, and I think the asset pipeline has some potential, but I haven't found a replacement for Jammit's JST compilation. (Although I haven't looked very hard. I'm sure there's a solution out there.)


Sprockets includes Jammit-inspired JST support. You can use it with either EJS or Eco templates. See the "JavaScript Templating" section of the readme: https://github.com/sstephenson/sprockets#readme

You can even write your own JST template class. Here's an example that adds Mustache template support: https://github.com/josh/mustache-trimmer/blob/master/lib/til...


Cool, thanks! I can't wait to try that out.


"Sprockets supports JavaScript templates for client-side rendering of strings or markup. JavaScript templates have the special format extension .jst and are compiled to JavaScript functions"

From sprocket README. Although, I have switched to Rails 3.1 and I am not using asset pipelining at all, just sticking with jammit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: