Sha256: 30c803f6858727990a22156467682f6861e244b239104fd0ad65a52409a96670

Contents?: true

Size: 403 Bytes

Versions: 8

Compression:

Stored size: 403 Bytes

Contents

require "pry"

namespace :secondbureau do
  desc "change erb to haml"
  task :erb_to_haml do
    current_folder = Rake.application.original_dir
    Dir.glob('app/views/**/*.erb').each do |item|
      puts "generate #{current_folder}/#{item[0..-4]}haml"
      system "html2haml #{current_folder}/#{item} #{current_folder}/#{item[0..-4]}haml"
      system "rm #{current_folder}/#{item}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
secondbureau-0.0.4.4 lib/tasks/views.rake
secondbureau-0.0.4.3 lib/tasks/views.rake
secondbureau-0.0.4.2 lib/tasks/views.rake
secondbureau-0.0.4.1 lib/tasks/views.rake
secondbureau-0.0.4 lib/tasks/views.rake
secondbureau-0.0.3 lib/tasks/views.rake
secondbureau-0.0.2 lib/tasks/views.rake
secondbureau-0.0.1 lib/tasks/views.rake