concordusapps / grunt-haml

Process HAML templates to precompiled JavaScript or rendered HTML.
https://npmjs.org/package/grunt-haml
MIT License
41 stars 28 forks source link

Add precompiled template (js target) support to ruby haml #10

Open mehcode opened 11 years ago

mehcode commented 11 years ago

https://github.com/elfsternberg/grunt-ruby-haml/blob/master/src/ruby-haml.coffee#L18-L19


This seems like something nice to have as the current ruby haml implementation only allows for an html target.

To be clear — I'm not going to be working on this; I'm just posting this as a possible enhancement that anyone is welcome to do.

joneshf commented 11 years ago

Wait, what is supposed to happen here? Are we adding support for js to grunt-haml, or to grunt-ruby-haml?

mehcode commented 11 years ago

grunt-ruby-haml (in my opinion) is a superfluous project that could be merged into this project. I had this idea before we had ruby support here. Now we have ruby support here but only for server-side templates. We don't have support for target: 'js'.

joneshf commented 11 years ago

Gotcha, so add js support to grunt-haml.

robwierzbowski commented 10 years ago

Shouldn't this be added at the Haml level, and then bubble up into grunt-haml?

mehcode commented 10 years ago

@robwierzbowski I wouldn't think that the project would care to provide JST when its meant (as far as I know) for server-side templating. But if someone can work it in there then that would be better, I agree.

robwierzbowski commented 10 years ago

Edit: Not sure how the grunt task can act anywhere besides on the server. I might not be understanding, but if the goal is to include JST files that are rendered by node in a Haml template, wouldn't you have a two part process: first use a grunt plugin designed for your particular flavor of JST to render JST to HTML, then include that HTML with grunt-haml/Haml?

mehcode commented 10 years ago

Not sure how the grunt task can act anywhere besides on the server.

For our stack at @concordusapps we use grunt-haml to transform haml files to JST and rendered using chaplin on the client. Simple demo we showed off a while ago: https://github.com/concordusapps/chaplin-demo

robwierzbowski commented 10 years ago

Thanks, I'll take a look. Appreciate the grunt task, by the way.

Rob Wierzbowski @robwierzbowski http://twitter.com/#!/robwierzbowski http://github.com/robwierzbowski http://robwierzbowski.com

On Thu, Jan 9, 2014 at 2:23 PM, Ryan Leckey notifications@github.comwrote:

Not sure how the grunt task can act anywhere besides on the server.

For our stack at @concordusapps https://github.com/concordusapps we use grunt-haml to transform haml files to JST and rendered using chaplin. Simple demo we showed off a while ago: https://github.com/concordusapps/chaplin-demo

— Reply to this email directly or view it on GitHubhttps://github.com/concordusapps/grunt-haml/issues/10#issuecomment-31966502 .