mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
CoffeeScript 0.1.4
This commit is contained in:
parent
d46bf8ee71
commit
62485c2b8c
6 changed files with 35 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
Gem::Specification.new do |s|
|
||||
s.name = 'coffee-script'
|
||||
s.version = '0.1.3' # Keep version in sync with coffee-script.rb
|
||||
s.version = '0.1.4' # Keep version in sync with coffee-script.rb
|
||||
s.date = '2009-12-25'
|
||||
|
||||
s.homepage = "http://jashkenas.github.com/coffee-script/"
|
||||
|
|
|
@ -188,6 +188,7 @@ gem install coffee-script</pre>
|
|||
|
||||
<pre>
|
||||
coffee-script path/to/script.coffee
|
||||
coffee-script --interactive
|
||||
coffee-script --watch --lint experimental.coffee
|
||||
coffee-script --print app/scripts/*.coffee > concatenation.js</pre>
|
||||
|
||||
|
@ -443,6 +444,18 @@ coffee-script --print app/scripts/*.coffee > concatenation.js</pre>
|
|||
|
||||
<h2 id="change_log">Change Log</h2>
|
||||
|
||||
<p>
|
||||
<b class="header" style="margin-top: 20px;">0.1.4</b>
|
||||
The official CoffeeScript extension is now <tt>.coffee</tt> instead of
|
||||
<tt>.cs</tt>, which properly belongs to
|
||||
<a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>.
|
||||
Due to popular demand, you can now also use <tt>=</tt> to assign. Unlike
|
||||
JavaScript, <tt>=</tt> can also be used within object literals, interchangeably
|
||||
with <tt>:</tt>. Made a grammatical fix for chained function calls
|
||||
like <tt>func(1)(2)(3)(4)</tt>. Inheritance and super no longer use
|
||||
<tt>__proto__</tt>, so they should be IE-compatible now.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b class="header" style="margin-top: 20px;">0.1.3</b>
|
||||
The <tt>coffee-script</tt> command now includes <tt>--interactive</tt>,
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
lunch = __d;
|
||||
// Zebra-stripe a table.
|
||||
var __e = table;
|
||||
var __h = [];
|
||||
for (var __f=0, __g=__e.length; __f<__g; __f++) {
|
||||
var row = __e[__f];
|
||||
var i = __f;
|
||||
i % 2 === 0 ? highlight(row) : null;
|
||||
__h[__f] = i % 2 === 0 ? highlight(row) : null;
|
||||
}
|
||||
__h;
|
||||
})();
|
17
index.html
17
index.html
|
@ -258,6 +258,7 @@ gem install coffee-script</pre>
|
|||
|
||||
<pre>
|
||||
coffee-script path/to/script.coffee
|
||||
coffee-script --interactive
|
||||
coffee-script --watch --lint experimental.coffee
|
||||
coffee-script --print app/scripts/*.coffee > concatenation.js</pre>
|
||||
|
||||
|
@ -567,11 +568,13 @@ highlight(row) <span class="Keyword">for</span> row, i <span class="Keyword">in<
|
|||
lunch <span class="Keyword">=</span> __d;
|
||||
<span class="Comment"><span class="Comment">//</span> Zebra-stripe a table.</span>
|
||||
<span class="Storage">var</span> __e <span class="Keyword">=</span> table;
|
||||
<span class="Storage">var</span> __h <span class="Keyword">=</span> [];
|
||||
<span class="Keyword">for</span> (<span class="Storage">var</span> __f<span class="Keyword">=</span><span class="Number">0</span>, __g<span class="Keyword">=</span>__e.<span class="LibraryConstant">length</span>; __f<span class="Keyword"><</span>__g; __f<span class="Keyword">++</span>) {
|
||||
<span class="Storage">var</span> row <span class="Keyword">=</span> __e[__f];
|
||||
<span class="Storage">var</span> i <span class="Keyword">=</span> __f;
|
||||
i <span class="Keyword">%</span> <span class="Number">2</span> <span class="Keyword">===</span> <span class="Number">0</span> ? highlight(row) : <span class="BuiltInConstant">null</span>;
|
||||
__h[__f] <span class="Keyword">=</span> i <span class="Keyword">%</span> <span class="Number">2</span> <span class="Keyword">===</span> <span class="Number">0</span> ? highlight(row) : <span class="BuiltInConstant">null</span>;
|
||||
}
|
||||
__h;
|
||||
</pre><br class='clear' /></div>
|
||||
|
||||
<p id="slice">
|
||||
|
@ -830,6 +833,18 @@ world...";
|
|||
|
||||
<h2 id="change_log">Change Log</h2>
|
||||
|
||||
<p>
|
||||
<b class="header" style="margin-top: 20px;">0.1.4</b>
|
||||
The official CoffeeScript extension is now <tt>.coffee</tt> instead of
|
||||
<tt>.cs</tt>, which properly belongs to
|
||||
<a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>.
|
||||
Due to popular demand, you can now also use <tt>=</tt> to assign. Unlike
|
||||
JavaScript, <tt>=</tt> can also be used within object literals, interchangeably
|
||||
with <tt>:</tt>. Made a grammatical fix for chained function calls
|
||||
like <tt>func(1)(2)(3)(4)</tt>. Inheritance and super no longer use
|
||||
<tt>__proto__</tt>, so they should be IE-compatible now.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b class="header" style="margin-top: 20px;">0.1.3</b>
|
||||
The <tt>coffee-script</tt> command now includes <tt>--interactive</tt>,
|
||||
|
|
|
@ -9,7 +9,7 @@ require "coffee_script/parse_error"
|
|||
# Namespace for all CoffeeScript internal classes.
|
||||
module CoffeeScript
|
||||
|
||||
VERSION = '0.1.3' # Keep in sync with the gemspec.
|
||||
VERSION = '0.1.4' # Keep in sync with the gemspec.
|
||||
|
||||
# Compile a script (String or IO) to JavaScript.
|
||||
def self.compile(script, options={})
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
"description": "Unfancy JavaScript",
|
||||
"keywords": ["javascript", "language"],
|
||||
"author": "Jeremy Ashkenas",
|
||||
"version": "0.1.3"
|
||||
"version": "0.1.4"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue