Skip to content

Instantly share code, notes, and snippets.

@zhiyao
Created October 3, 2016 08:15
Show Gist options
  • Save zhiyao/97ef6a36d574f122580ccabeb5beec54 to your computer and use it in GitHub Desktop.
Save zhiyao/97ef6a36d574f122580ccabeb5beec54 to your computer and use it in GitHub Desktop.
Rename jade extension to pug extension
jade_files = Dir.glob("../**/*.jade")
jade_files.each do |jade_file|
puts "Renaming #{jade_file}"
pug_file = jade_file.gsub(/.jade$/, '.pug')
puts "> #{pug_file}"
File.rename(jade_file, pug_file)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment