haml2handlebars is a tool for converting Haml to Handlebars markup.
haml2handlebars is currently distributed as a ruby gem.
gem install haml2handlebars
Use the haml2handlebars
command line or from Ruby call the Haml2Handlebars.convert
method to have Haml markup translated into Handlebars.
echo '.foo= bar' | haml2handlebars
# <div class='foo'>{{bar}}</div>
haml = """
- if foo
.bar= baz
- else
= qux
"""
Haml2Handlebars.convert(haml)
# =>
# {{#if foo}}
# <div class='bar'>{{baz}}</div>
# {{else}}
# {{qux}}
# {{/if}}
- Integrate with Rails Asset Pipeline for use in rails-ember projects, probably in a separate gem that depends on this?
Based on elia/haml2erb: Elia Schito
Which is based on c1sgo/haml2erb: Chris Goddard Louis Sivillo