Gem neccessary the first in rails

Template Converters ERB to SLIM


How convert your .erb to .slim :

Currently there are two ways to convert your ERB templates to Slim. One is using the still experimental html2slim gem. The other one is converting to HAML and then to Slim, using the html2haml and haml2slim gems.

Using html2slim

Install the gem.
gem install html2slim
Now you have two command line utilities html2slim and erb2slim. Just run erb2slim -h and you'll receive more instructions. The current version (0.0.2) will output something like that:
$ erb2slim -h
Usage: erb2slim INPUT_FILENAME_OR_DIRECTORY [OUTPUT_FILENAME_OR_DIRECTORY] [options]
        --trace                      Show a full traceback on error
    -d, --delete                     Delete ERB files
    -h, --help                       Show this message
    -v, --version                    Print version

Comments

Popular Posts