Skip to content

Instantly share code, notes, and snippets.

@rafbm
Created August 22, 2012 03:45
Show Gist options
  • Save rafbm/3422110 to your computer and use it in GitHub Desktop.
Save rafbm/3422110 to your computer and use it in GitHub Desktop.
Compile CoffeeScript to JavaScript TextMate command
#!/usr/bin/env ruby
# encoding: utf-8
error = `coffee -c #{ENV['TM_FILEPATH']} 2>&1`
if error == ''
puts "✔ compiled #{ENV['TM_FILEPATH'].sub(/\.coffee$/, '.js')}"
else
puts "❗#{error}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment