maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
727 stars 58 forks source link

Rails integration #10

Open aemadrid opened 12 years ago

aemadrid commented 12 years ago

What the easiest way to integrate iced into the rails asset pipeline? I've tried a couple of things but didn't get it to work.

maxtaco commented 12 years ago

Thanks for the report, I'll look into it!

aemadrid commented 12 years ago

Sorry, closed it in error.

maxtaco commented 12 years ago

Waiting on my rubyforge account application to be approved!

maxtaco commented 12 years ago

I tried my hand at this, is it working? What's a test case I should look for?

The gem is iced-coffee-script

eric-hu commented 11 years ago

I made a minimal demo here: https://github.com/eric-hu/ics_rails_demo

Right now it looks like the iced-coffee-script compiler isn't being used by Rails. I'd be happy to spend some time off-hours configuring this, for now I've spent enough work time that I feel guilty :)

Rails 3.1+ ships with Coffeescript integration via the coffee-rails gem, so the next step would be to look into how that hooks into rails and set up something similar for ICS

Spaceghost commented 11 years ago

I personally would enjoy some nice icedcoffee in my rails. Is the iced-coffee-script gem enough to get started, or will there be a gem to more tightly integrate with rails?

eric-hu commented 11 years ago

From what I saw with that demo I put together, the await and defer keywords weren't treated as valid, so the Sprockets Coffeescript compiler must still be using the default Coffeescript compiler.

I haven't made time to look into how that's all wired together, yet. I'd like to look into it more and decide if I can dedicate enough time to get it working.