CoffeeScript 0.2.4, with pattern matching and heredocs

This commit is contained in:
Jeremy Ashkenas 2010-01-12 00:09:23 -05:00
parent c8d505e85d
commit 9a61bbf005
5 changed files with 26 additions and 12 deletions

View File

@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'coffee-script'
s.version = '0.2.3' # Keep version in sync with coffee-script.rb
s.date = '2010-1-10'
s.version = '0.2.4' # Keep version in sync with coffee-script.rb
s.date = '2010-1-12'
s.homepage = "http://jashkenas.github.com/coffee-script/"
s.summary = "The CoffeeScript Compiler"

View File

@ -51,7 +51,7 @@
<p>
<b>Latest Version:</b>
<a href="http://gemcutter.org/gems/coffee-script">0.2.3</a>
<a href="http://gemcutter.org/gems/coffee-script">0.2.4</a>
</p>
<h2>Table of Contents</h2>
@ -508,8 +508,8 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
<p id="pattern_matching">
<b class="header">Pattern Matching (Destructuring Assignment)</b>
To make working with complex arrays and objects more convenient,
CoffeeScript provides ECMAScript Harmony's proposed
To make extracting values from complex arrays and objects more convenient,
CoffeeScript implements ECMAScript Harmony's proposed
<a href="http://wiki.ecmascript.org/doku.php?id=harmony:destructuring">destructuring assignment</a>
syntax. When you assign an array or object literal to a value, CoffeeScript
breaks up and matches both sides against each other, assigning the values
@ -524,7 +524,7 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
<%= code_for('multiple_return_values', 'forecast') %>
<p>
Pattern matching can be used with any depth of array and object nesting,
to help cleanly extract deeply nested properties.
to help pull out deeply nested properties.
</p>
<%= code_for('object_extraction', 'poet + " — " + street') %>
@ -624,6 +624,13 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
</ul>
<h2 id="change_log">Change Log</h2>
<p>
<b class="header" style="margin-top: 20px;">0.2.4</b>
Added ECMAScript Harmony style destructuring assignment, for dealing with
extracting values from nested arrays and objects. Added indentation-sensitive
heredocs for nicely formatted strings or chunks of code.
</p>
<p>
<b class="header" style="margin-top: 20px;">0.2.3</b>

View File

@ -37,7 +37,7 @@
<p>
<b>Latest Version:</b>
<a href="http://gemcutter.org/gems/coffee-script">0.2.3</a>
<a href="http://gemcutter.org/gems/coffee-script">0.2.4</a>
</p>
<h2>Table of Contents</h2>
@ -1128,8 +1128,8 @@ tom.move();
<p id="pattern_matching">
<b class="header">Pattern Matching (Destructuring Assignment)</b>
To make working with complex arrays and objects more convenient,
CoffeeScript provides ECMAScript Harmony's proposed
To make extracting values from complex arrays and objects more convenient,
CoffeeScript implements ECMAScript Harmony's proposed
<a href="http://wiki.ecmascript.org/doku.php?id=harmony:destructuring">destructuring assignment</a>
syntax. When you assign an array or object literal to a value, CoffeeScript
breaks up and matches both sides against each other, assigning the values
@ -1183,7 +1183,7 @@ forecast = __a[2];
;alert(forecast);'>run: forecast</button><br class='clear' /></div>
<p>
Pattern matching can be used with any depth of array and object nesting,
to help cleanly extract deeply nested properties.
to help pull out deeply nested properties.
</p>
<div class='code'><pre class="idle"><span class="FunctionName">futurists</span><span class="Keyword">:</span> {
<span class="FunctionName">sculptor</span><span class="Keyword">:</span> <span class="String"><span class="String">&quot;</span>Umberto Boccioni<span class="String">&quot;</span></span>
@ -1406,6 +1406,13 @@ html <span class="Keyword">=</span> <span class="String"><span class="String">&q
</ul>
<h2 id="change_log">Change Log</h2>
<p>
<b class="header" style="margin-top: 20px;">0.2.4</b>
Added ECMAScript Harmony style destructuring assignment, for dealing with
extracting values from nested arrays and objects. Added indentation-sensitive
heredocs for nicely formatted strings or chunks of code.
</p>
<p>
<b class="header" style="margin-top: 20px;">0.2.3</b>

View File

@ -10,7 +10,7 @@ require "coffee_script/parse_error"
# Namespace for all CoffeeScript internal classes.
module CoffeeScript
VERSION = '0.2.3' # Keep in sync with the gemspec.
VERSION = '0.2.4' # Keep in sync with the gemspec.
# Compile a script (String or IO) to JavaScript.
def self.compile(script, options={})

View File

@ -5,5 +5,5 @@
"description": "Unfancy JavaScript",
"keywords": ["javascript", "language"],
"author": "Jeremy Ashkenas",
"version": "0.2.3"
"version": "0.2.4"
}