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

Passing arguments to haml-js? #24

Open chug2k opened 10 years ago

chug2k commented 10 years ago

I'd like to pass arguments to haml-js to escape HTML by default. The documentation says I should do this:

Haml(src, {escapeHtmlByDefault: true})

How do I do this from grunt-haml?

mehcode commented 10 years ago

It doesn't look like its currently possible to do so; see https://github.com/concordusapps/grunt-haml/blob/master/tasks/haml.js#L137

It'd be trivial to add if you want to fling a pull request our way (just add options as the second parameter to the function).

melcher commented 10 years ago

@chug2k Did you end up with a solution? Interested in the same thing and will take a pass at extending the plugin.

melcher commented 10 years ago

Actually I'm happy to use the existing context option in coffee-haml. Added a PR to document the option in #25