Skip to content

Complete solutions to convert ERB, SLIM, AND HAML with the least amount of manual effort

Notifications You must be signed in to change notification settings

westonganger/ruby_view_template_converters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Ruby View Template Converters

Gem Version CI Status RubyGems Downloads

Complete solutions to convert ERB, SLIM, AND HAML with the least amount of manual effort.

Features:

  • Converts ERB, SLIM, or HAML
  • Support conversion in both directions for each view template language

Installation

gem install ruby_view_template_converters

Or if you want to download and use the scripts directly you can download from the bin/ folder

Command Line Usage

Convert from ERB

ERB to SLIM

ruby_view_template_converters --erb-to-haml <file-path-or-glob>

ERB to HAML (TBD - Help wanted)

ruby_view_template_converters --erb-to-haml <file-path-or-glob>

Convert from SLIM

SLIM to ERB

ruby_view_template_converters --slim-to-erb <file-path-or-glob>

SLIM to HAML (TBD - Help wanted)

ruby_view_template_converters --slim-to-haml <file-path-or-glob>

Convert from HAML

HAML to ERB (TBD - Help wanted)

ruby_view_template_converters --haml-to-erb <file-path-or-glob>

HAML to SLIM (TBD - Help wanted)

ruby_view_template_converters --haml-to-slim <file-path-or-glob>

Ruby Usage

ViewTemplateConverters.erb_to_slim(file_path_or_glob)
ViewTemplateConverters.erb_to_haml(file_path_or_glob)

ViewTemplateConverters.slim_to_erb(file_path_or_glob)
ViewTemplateConverters.slim_to_haml(file_path_or_glob)

ViewTemplateConverters.haml_to_erb(file_path_or_glob)
ViewTemplateConverters.haml_to_slim(file_path_or_glob)

Credits

Created & Maintained by Weston Ganger - @westonganger

About

Complete solutions to convert ERB, SLIM, AND HAML with the least amount of manual effort

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages