Coffeescript being compiled to javascript

I am using Rails 3.1.1 with asset pipeline and coffeescript. I have a
number of Coffeescript files in the app/assets/javascripts directory.
Whenever I make a change to the coffeescript files in that directory, it
is producing a corresponding javascript file automatically.

The changes that I make to the coffeescript files are being used
correctly by rails, but I am not sure as to why does it have to produce
a “.js” file corresponding to the coffeescript files. Is there a
setting that I need to enable/disable?

Thanks.

Bharat

On Thu, Nov 3, 2011 at 19:47, Bharat R. [email protected]
wrote:

The changes that I make to the coffeescript files are being used
correctly by rails, but I am not sure as to why does it have to produce
a “.js” file corresponding to the coffeescript files. Is there a
setting that I need to enable/disable?

Nope. Producing .js files is correct behavior. That’s what the
user’s browser understands. (Well, that and HTML; my point is, the
browser doesn’t understand Coffeescript.)

-Dave


LOOKING FOR WORK! What: Ruby (on/off Rails), Python, other modern
languages.
Where: Northern Virginia, Washington DC (near Orange Line), and remote
work.
See: davearonson.com (main) * codosaur.us (code) * dare2xl.com
(excellence).
Specialization is for insects. (Heinlein) - Have Pun, Will Babble!
(Aronson)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs