Created
July 27, 2018 16:24
-
-
Save ryanlitalien/180c143cfd8f982996c6d0aab4de8ee9 to your computer and use it in GitHub Desktop.
Convert Slim HTML to ERB
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
# Replace path | |
Dir.glob("/Users/ryan/dev/railsapp/**/*.slim") do |slim| | |
@html = slim.gsub(/\.slim\z/, '.erb') | |
`slimrb --erb --pretty #{slim} > #{@html}` | |
File.delete slim | |
puts "Made #{@html}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment