Sha256: c1e5ea98592a648a6bbdfae49251b80e73b23f563fa5a82b80d5ebe23894c790

Contents?: true

Size: 368 Bytes

Versions: 4

Compression:

Stored size: 368 Bytes

Contents

# gem install haml2slim --no-ri --no-rdoc
# ruby views_converter.rb

from = "./app/views/the_comments/haml"
to   = "./app/views/the_comments/slim"

`haml2slim #{from} #{to} --trace`

Dir.glob("#{to}/*.slim") do |slim_file|
  content = File.read slim_file
  content = content.gsub "haml", "slim"

  file = File.open slim_file, "w"
  file.write content
  file.close
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
fuck_comments-2.3.4 views_converter.rb
the_comments_ruby-2.3.4 views_converter.rb
the_comments_ruby-2.3.3 views_converter.rb
the_comments-2.3.1 views_converter.rb