erb2haml adds a simple rake task to your Rails app to converts all ERb HTML files in APP_HOME/app/views/ to Haml.
Existing Haml files are untouched.
-
Add
gem "erb2haml"to the development group in your Gemfile.Either add the line
gem "erb2haml", :group => :developmentto yourGemfile, or
group :development do ... gem "erb2haml" # Add this line ... end -
Run
rake haml:convert_erbsto convert your ERB files without removing them, or runrake haml:replace_erbsto convert and replace your ERB files to your new HAML files. -
Watch your ERB files getting converted to haml.
And that's it!
Copyright (c) 2011 David Leung. See LICENSE for further details.