vwya4q
Last Updated: February 25, 2016
·
1.057K
· notgary
Ba6aba5790e7412dd4f6041c42a24c7e

Easily convert haml files to erb using Herbalizer

Herbalizer is a really cool tool that can take a HAML file is input and generate the equivalent ERB. It's a haskell package and needs to be installed using cabal, the haskell package manager like so:

Ubuntu

sudo apt-get install cabal-install
cabal install herbalizer

Mac OS

brew install haskell-platform
cabal update
cabal install herbalizer

Once installed, simply use it like

herbalizer path/to/haml/file.haml > path/to/erb/output.erb

It has problems parsing some of the more exotic haml features, so occasionally you'll have to remove a problematic part of the haml, convert it, and manually key it into the erb.

Say Thanks
Respond

4 Responses
Add your response

12342
12003957 10206752435102297 2524621803006121539 n

why would you ever want to do this when you have a bunch of great HAML files? :)

over 1 year ago ·
12421
0d1f90543d02719dea95695d6a10a778

Thanks, but brew install cabal didn't work for me (cabal couldn't be found)

This worked:

brew install haskell-platform
cabal update
cabal install herbalizer
over 1 year ago ·
12433
Ba6aba5790e7412dd4f6041c42a24c7e

Thanks a lot for the feedback. I've updated the post.

over 1 year ago ·
12454
147186f2f9c90edfc509a0b045038736

what about windows?

over 1 year ago ·