среда, 12 мая 2010 г.

Convert HTML to HAML snippet.

Not for along time ago I've started to use haml syntax for quickly writing html code for rails applications. But in one day I received for applying any changes existence rails 2.3.5 application written using the standard html.erb templates for views.
I start to search how to change current html.erb to haml code and I found!!!
$> find . -name '*erb' | \
xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | \
bash
This is great script I've found in the next following link -> great snippet

Комментариев нет: