Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Nov 14, 2010
1 parent 96ae3bc commit 5118d63
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,47 @@ Installation

gem install coffee-script

*This compiler lib has replaced the original CoffeeScript compiler that was written in Ruby*
*Note: This compiler library has replaced the original CoffeeScript
compiler that was written in Ruby.*


Dependencies
------------

The compiler depends on the `coffee-script-source` gem which is updated any time a new version of CoffeeScript is released. The gem's version number is sync'd up with the javascript release. This way you can build against different versions of CoffeeScript from this compiler.
This library depends on the `coffee-script-source` gem which is
updated any time a new version of CoffeeScript is released. (The
`coffee-script-source` gem's version number is synced with each
official CoffeeScript release.) This way you can build against
different versions of CoffeeScript by requiring the correct version of
the `coffee-script-source` gem.

You can also use this lib with unreleased versions of CoffeeScript:
In addition, you can use this library with unreleased versions of
CoffeeScript by setting the `COFFEESCRIPT_SOURCE_PATH` environment
variable:

export COFFEESCRIPT_SOURCE_PATH=/path/to/coffee-script/extras/coffee-script.js

The json library is also required but is not explicity stated as a gem dependency. If you're on 1.8 you'll need to install the json or json_pure gem. Its already included in 1.9.
The `json` library is also required but is not explicitly stated as a
gem dependency. If you're on Ruby 1.8 you'll need to install the
`json` or `json_pure` gem. On Ruby 1.9, `json` is included in the
standard library.


Engines
-------

The `coffee-script` lib will automatically choose the best JavaScript engine for your platform. The currently implemented engines are:
The `coffee-script` library will automatically choose the best
JavaScript engine for your platform. The currently implemented engines
are:

* **Node.js**. If the `node` binary is available in $PATH, it will be used to invoke the CoffeeScript compiler.
* **Node.js**. If the `node` binary is available in `$PATH`, it will
be used to invoke the CoffeeScript compiler.

* **JavaScript Core**. If you're on OS X and don't have Node.js installed, the lib will fall back to the built-in JavaScript Core binary, `jsc`. This way you don't need any additional dependencies.
* **JavaScript Core**. If you're on OS X and don't have Node.js
installed, the library will fall back to the built-in JavaScript
Core binary, `jsc`. This way you don't need to install any
additional dependencies.

* **V8**. Shelling out to Node.js may be too slow for your production environment. In this case, install `therubyracer` gem, which provides a fast bridge between Ruby and V8.
* **V8**. Shelling out to Node.js may be too slow for your production
environment. In this case, install `therubyracer` gem, which
provides a fast bridge between Ruby and V8.

0 comments on commit 5118d63

Please sign in to comment.