SproutCore + CoffeeScript in love
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
Gemfile
History.txt
README.md Updated History, Readme (added disclamer :)), bumped version May 10, 2011
Rakefile Just code style Apr 27, 2011
sproutcore-coffeescript.gemspec Renamed Coffeescript to CoffeeScript to be consistent with SC build t… May 10, 2011

README.md

SproutCore + CoffeeScript

This ruby gem adds support for CoffeeScript files in SproutCore projects.

Usage

Install the gem

gem install sproutcore-coffeescript

Add to the top of the Buildfile in the root of your project:

begin
  gem "sproutcore-coffeescript", "~> 0.1.4"
  require "sproutcore-coffeescript"
rescue LoadError
  puts "sproutcore-coffeescript not installed, please run:\n\n  gem install sproutcore-coffeescript\n\n"
  exit
end

Use .coffee instead of .js. Enjoy.

Disclaimer

This gem monkey-patches SproutCore build tools on several places, which is ugly and can break with any future update of SproutCore. Also, I doubt I have covered all places in the build tools where javascript files are handled. It is not unlikely it won't work properly in all situations. You've been warned.

Having said that, I use this gem in my applications and it works for me. If you find a bug, let me know.

Acknowledgment

First version of the code was taken from Brandon Dimcheff's fork of Abbot here, updated to SproutCore 1.5 and packaged as a separate gem.