I’ve been playing around with IcedCoffeeScript for a while now and wanted an easy integration with Ruby on Rails Asset Pipeline.
The result is iced-rails. I decided to introduce the .iced
file extension for IcedCoffeeScript, rather than overwriting .coffee
even though IcedCoffeeScript is a superset of CoffeeScript. The Iced command line also defaults to .iced
and I want to avoid surprises when using the gem.
IcedCoffeeScript generates continuations to avoid callback pyramids by introducing two new keywords, await
and defer
. You can find more details about IcedCoffeeScript here.
At the moment the Asset Pipeline integration has one caveat in that the iced boilerplate is generated per .iced
file. Ideally it should be generated only once.
I guess I’ll add this feature in a later version.