Skip to content

Instantly share code, notes, and snippets.

@vijayanandnandam
Created April 20, 2019 15:34
Show Gist options
  • Save vijayanandnandam/4b8feabece5d5fe15aa0db4f02598895 to your computer and use it in GitHub Desktop.
Save vijayanandnandam/4b8feabece5d5fe15aa0db4f02598895 to your computer and use it in GitHub Desktop.
Convert Recursiverly ERB to haml
# install html2 haml gem then run in the directory to convert erb haml files
# You have to delete erb files your self after checking if everything is ok..
for file in $(find . -type f -name \*.html.erb); do
html2haml -e ${file} "$(dirname ${file})/$(basename ${file} .erb).haml";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment