Archive for the 'coffeescript' Category


adding coffeescript support to sublime text 2 in ubuntu

Download Sublime, and start it one time, so that it creates the ~/.config/sublime-text-2 folder. chdir to ~/.config/sublime-text-2/Installed Packages and run:

git clone git:// CoffeeScriptBundle.tmbundle

Restart sublime, and now coffeescript syntax highlighting will work.


using coffeescript on windows

If you want to develop with CoffeeScript outside of Rails, here’s one way you could do it:

  • download the coffee.exe executable from CoffeeScript compiler for Windows
  • copy coffee.exe in a folder that is on the PATH
  • create a watchr file, for the ruby gem watchr. This way, everytime you modify the .coffee file, the js file gets recompiled. Here are the contents of my watchr file:
    watch("js/") do |s|
    	puts "#{} => Compiling #{s}"
    	system("coffee -c #{s[0]}")
  • start watching the file for modifications:
    watcher your_watch_file.rb
  • add the include for the resulting JS in your html code and you’re done

Blog Stats

  • 265,754 hits