Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
ERB to Slim command
gem install html2haml && gem install haml2slim
# then... convert and remove original erb files:
find ./app/views -name '*.erb' | xargs -I file sh -c \
'html2haml --erb file | haml2slim > $(echo file | sed 's/erb/slim/') && \
rm file'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment