Last active
August 29, 2015 14:03
-
-
Save swards/4f69606a4bf88767b79c to your computer and use it in GitHub Desktop.
A script to go through all erb files and convert them to haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run without 'bash' to see the commands called. To be run from the root of the application folder (above the app directory) | |
$ find app -name '*.erb' | \ | |
xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | \ | |
bash | |
// And a script to remove all erb files via git (remove 'git' if not in git yet) | |
$ find app -name '*.erb' | \ | |
xargs ruby -e 'ARGV.each { |i| puts "git rm #{i}"}' | \ | |
bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment