Skip to content

Instantly share code, notes, and snippets.

@tommyp
Last active December 13, 2015 19:08
Show Gist options
  • Select an option

  • Save tommyp/4960497 to your computer and use it in GitHub Desktop.

Select an option

Save tommyp/4960497 to your computer and use it in GitHub Desktop.
Command line conversion for html.erb to .haml gem install html2haml and then run it
find . -name '*erb' | \
xargs ruby -e 'ARGV.each { |i|
%x(html2haml -e #{i} #{i.sub(/erb$/,"haml")})
puts "Converting #{i}"
}'
find . -name '*erb' -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment