From 6658250c8eb73c451b667358dd578d829b456abe Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Tue, 5 Jan 2010 00:34:18 -0500 Subject: [PATCH] more docs --- documentation/coffee/overview.coffee | 7 +++++ documentation/index.html.erb | 7 ++++- documentation/js/existence.js | 2 +- documentation/js/overview.js | 12 ++++++++- documentation/underscore.html | 6 ++++- index.html | 40 +++++++++++++++++++++++++--- lib/coffee_script/nodes.rb | 2 +- 7 files changed, 67 insertions(+), 9 deletions(-) diff --git a/documentation/coffee/overview.coffee b/documentation/coffee/overview.coffee index 44e4ec95..295f38a1 100644 --- a/documentation/coffee/overview.coffee +++ b/documentation/coffee/overview.coffee @@ -18,5 +18,12 @@ math: { cube: x => x * square(x) } +# Splats: +race: winner, *runners => + print(winner, runners) + +# Existence: +alert("I knew it!") if elvis? + # Array comprehensions: cubed_list: math.cube(num) for num in list diff --git a/documentation/index.html.erb b/documentation/index.html.erb index 1ed90f1a..6ba321da 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -108,7 +108,7 @@ For a longer CoffeeScript example, check out Underscore.coffee, a port of Underscore.js - to CoffeeScript, which, when compiled, passes the complete Underscore test suite. + to CoffeeScript, which, when compiled, can pass the complete Underscore test suite.

Installation and Usage

@@ -537,6 +537,11 @@ coffee --print app/scripts/*.coffee > concatenation.js