cbea7b5d1c
* Add failing test per #4406 * If a parameter is a function call, define it in an expression within the function body * Remove the space between `function` and `*` for generator functions, to follow usual ES idiom * We can collapse `isCall` into `isComplex` * Don’t need existence check here * Correct destructured parameter default evaluation order with an incrementing variable (or more generally any complicated parameter that isComplex) * Try to pull complex parameters out of the parameter list if their order of execution matters; but don’t pull _all_ complex parameters out of the parameter list, so that we don’t lose parameter default values * Add lots of comments about node special properties * Err on the side of caution in deciding whether a complex parameter is allowable in a function parameter list rather than the function body (there are lots more detections we could add to find additional “safe” parameters) * Follow the ES and CS2 convention of assigning parameter default values only when undefined, not when null or undefined * Along with arrays and empty objects, also let values whose bases are not complex be allowed in the function parameter list (like `obj.prop`) * Better way to check for undefined parameters when declaring them in a function body * Once we’ve put a complex parameter in the function body, all following complex parameters go into the function body; no need to create lots of exceptions of when to choose whether to put a complex param in the body * Rename `isComplex` to `shouldCache` for clarity |
||
---|---|---|
bin | ||
docs | ||
documentation | ||
lib/coffee-script | ||
src | ||
test | ||
.gitignore | ||
.nojekyll | ||
CONTRIBUTING.md | ||
Cakefile | ||
LICENSE | ||
README.md | ||
bower.json | ||
package.json | ||
register.js | ||
repl.js |
README.md
{
} } {
{ { } }
} }{ {
{ }{ } } _____ __ __
{ }{ }{ { } / ____| / _|/ _|
.- { { } { }} -. | | ___ | |_| |_ ___ ___
( { } { } { } } ) | | / _ \| _| _/ _ \/ _ \
|`-..________ ..-'| | |___| (_) | | | || __/ __/
| | \_____\___/|_| |_| \___|\___|
| ;--.
| (__ \ _____ _ _
| | ) ) / ____| (_) | |
| |/ / | (___ ___ _ __ _ _ __ | |_
| ( / \___ \ / __| '__| | '_ \| __|
| |/ ____) | (__| | | | |_) | |_
| | |_____/ \___|_| |_| .__/ \__|
`-.._________..-' | |
|_|
CoffeeScript is a little language that compiles into JavaScript.
Installation
If you have the node package manager, npm, installed:
npm install -g coffee-script
Leave off the -g
if you don't wish to install globally. If you don't wish to use npm:
git clone https://github.com/jashkenas/coffeescript.git
sudo coffeescript/bin/cake install
Getting Started
Execute a script:
coffee /path/to/script.coffee
Compile a script:
coffee -c /path/to/script.coffee
For documentation, usage, and examples, see: http://coffeescript.org/
To suggest a feature or report a bug: http://github.com/jashkenas/coffeescript/issues
If you'd like to chat, drop by #coffeescript on Freenode IRC.
The source repository: https://github.com/jashkenas/coffeescript.git
Changelog: http://coffeescript.org/#changelog
Our lovely and talented contributors are listed here: http://github.com/jashkenas/coffeescript/contributors