How can I convert html.slim files to html or html.erb?

后端 未结 4 794
离开以前
离开以前 2021-01-02 07:21

I need to convert the html.slim files in my Ruby on Rails application to html.erb. Is there any easy way to do it? I tried many options listed in Stack Overflow and other si

4条回答
  •  太阳男子
    2021-01-02 08:05

    You can!

    First, make sure you have already installed slim-rails. You can install it by calling gem install slim-rails.

    Then write something in the input.html

    Finally, you open the terminal and call:

    echo `slimrb input.html` > output.html

    NOTE: it is `, not ' or "

    Open file output.html, that's what you looking for!

提交回复
热议问题