1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

moving book link to the proper place to be rebuilt

This commit is contained in:
Jeremy Ashkenas 2013-02-13 10:35:21 +13:00
parent 31dd0b75af
commit 1aa57bf24f
2 changed files with 42 additions and 41 deletions

View file

@ -986,6 +986,11 @@ Expressions
closures, higher-order functions, objects, classes, combinators, and decorators. closures, higher-order functions, objects, classes, combinators, and decorators.
By <a href="http://braythwayt.com/">Reg Braithwaite</a>. By <a href="http://braythwayt.com/">Reg Braithwaite</a>.
</li> </li>
<li>
<a href="https://efendibooks.com/minibooks/testing-with-coffeescript">Testing with CoffeeScript</a>
is a succinct and freely downloadable guide to building testable
applications with CoffeeScript and Jasmine.
</li>
</ul> </ul>
<h2> <h2>

View file

@ -103,8 +103,8 @@
The golden rule of CoffeeScript is: <i>"It's just JavaScript"</i>. The code The golden rule of CoffeeScript is: <i>"It's just JavaScript"</i>. The code
compiles one-to-one into the equivalent JS, and there is compiles one-to-one into the equivalent JS, and there is
no interpretation at runtime. You can use any existing JavaScript library no interpretation at runtime. You can use any existing JavaScript library
seamlessly from CoffeeScript (and vice-versa). The compiled output is seamlessly from CoffeeScript (and vice-versa). The compiled output is
readable and pretty-printed, passes through readable and pretty-printed, passes through
<a href="http://www.javascriptlint.com/">JavaScript Lint</a> <a href="http://www.javascriptlint.com/">JavaScript Lint</a>
without warnings, will work in every JavaScript runtime, and tends without warnings, will work in every JavaScript runtime, and tends
to run as fast or faster than the equivalent handwritten JavaScript. to run as fast or faster than the equivalent handwritten JavaScript.
@ -268,7 +268,7 @@ npm install -g coffee-script</pre>
<p> <p>
(Leave off the <tt>-g</tt> if you don't wish to install globally.) (Leave off the <tt>-g</tt> if you don't wish to install globally.)
</p> </p>
<p> <p>
If you'd prefer to install the latest <b>master</b> version of CoffeeScript, you If you'd prefer to install the latest <b>master</b> version of CoffeeScript, you
can clone the CoffeeScript can clone the CoffeeScript
@ -282,7 +282,7 @@ npm install -g coffee-script</pre>
npm install -g http://github.com/jashkenas/coffee-script/tarball/master</pre> npm install -g http://github.com/jashkenas/coffee-script/tarball/master</pre>
<p> <p>
Or, if you want to install to <tt>/usr/local</tt>, and don't want to use Or, if you want to install to <tt>/usr/local</tt>, and don't want to use
npm to manage it, open the <tt>coffee-script</tt> directory and run: npm to manage it, open the <tt>coffee-script</tt> directory and run:
</p> </p>
@ -380,7 +380,7 @@ sudo bin/cake install</pre>
<tr> <tr>
<td><code>-b, --bare</code></td> <td><code>-b, --bare</code></td>
<td> <td>
Compile the JavaScript without the Compile the JavaScript without the
<a href="#lexical_scope">top-level function safety wrapper</a>. <a href="#lexical_scope">top-level function safety wrapper</a>.
</td> </td>
</tr> </tr>
@ -1098,7 +1098,7 @@ numbers[<span class="Number">3</span>..<span class="Number">6</span>] <span clas
</pre><pre class="idle"><span class="Storage">var</span> numbers, _ref; </pre><pre class="idle"><span class="Storage">var</span> numbers, _ref;
numbers <span class="Keyword">=</span> [<span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>, <span class="Number">6</span>, <span class="Number">7</span>, <span class="Number">8</span>, <span class="Number">9</span>]; numbers <span class="Keyword">=</span> [<span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>, <span class="Number">6</span>, <span class="Number">7</span>, <span class="Number">8</span>, <span class="Number">9</span>];
@ -1235,7 +1235,7 @@ globals = ((function() {
<span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>And the error is ... <span class="String">&quot;</span></span> <span class="Keyword">+</span> error; <span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>And the error is ... <span class="String">&quot;</span></span> <span class="Keyword">+</span> error;
} }
})()); })());
</pre><script>window.example19 = "alert(\n try\n nonexistent / undefined\n catch error\n \"And the error is ... #{error}\"\n)\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example19);'>load</div><div class='minibutton ok' onclick='javascript: </pre><script>window.example19 = "alert(\n try\n nonexistent / undefined\n catch error\n \"And the error is ... #{error}\"\n)\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example19);'>load</div><div class='minibutton ok' onclick='javascript:
alert((function() { alert((function() {
try { try {
return nonexistent / void 0; return nonexistent / void 0;
@ -1366,7 +1366,7 @@ footprints <span class="Keyword">=</span> yeti <span class="Keyword">?</span> <s
</pre><pre class="idle"><span class="Storage">var</span> footprints, solipsism, speed; </pre><pre class="idle"><span class="Storage">var</span> footprints, solipsism, speed;
<span class="Keyword">if</span> ((<span class="Keyword">typeof</span> mind <span class="Keyword">!</span><span class="Keyword">==</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> mind <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span>) <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> <span class="Keyword">!</span>(<span class="Keyword">typeof</span> world <span class="Keyword">!</span><span class="Keyword">==</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> world <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span>)) { <span class="Keyword">if</span> ((<span class="Keyword">typeof</span> mind <span class="Keyword">!</span><span class="Keyword">==</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> mind <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span>) <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> <span class="Keyword">!</span>(<span class="Keyword">typeof</span> world <span class="Keyword">!</span><span class="Keyword">==</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> world <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span>)) {
@ -1598,7 +1598,7 @@ tom.move();
<span class="LibraryClassType">String</span>.<span class="LibraryConstant">prototype</span>.<span class="FunctionName">dasherize</span> = <span class="Storage">function</span>() { <span class="LibraryClassType">String</span>.<span class="LibraryConstant">prototype</span>.<span class="FunctionName">dasherize</span> = <span class="Storage">function</span>() {
<span class="Keyword">return</span> <span class="Variable">this</span>.<span class="LibraryFunction">replace</span>(<span class="String"><span class="String">/</span>_<span class="String">/</span>g</span>, <span class="String"><span class="String">&quot;</span>-<span class="String">&quot;</span></span>); <span class="Keyword">return</span> <span class="Variable">this</span>.<span class="LibraryFunction">replace</span>(<span class="String"><span class="String">/</span>_<span class="String">/</span>g</span>, <span class="String"><span class="String">&quot;</span>-<span class="String">&quot;</span></span>);
}; };
</pre><script>window.example24 = "String::dasherize = ->\n this.replace /_/g, \"-\"\n\nalert \"one_two\".dasherize()"</script><div class='minibutton load' onclick='javascript: loadConsole(example24);'>load</div><div class='minibutton ok' onclick='javascript: </pre><script>window.example24 = "String::dasherize = ->\n this.replace /_/g, \"-\"\n\nalert \"one_two\".dasherize()"</script><div class='minibutton load' onclick='javascript: loadConsole(example24);'>load</div><div class='minibutton ok' onclick='javascript:
String.prototype.dasherize = function() { String.prototype.dasherize = function() {
return this.replace(/_/g, "-"); return this.replace(/_/g, "-");
}; };
@ -1630,7 +1630,7 @@ theSwitch <span class="Keyword">=</span> <span class="Number">0</span>
</pre><pre class="idle"><span class="Storage">var</span> theBait, theSwitch, _ref; </pre><pre class="idle"><span class="Storage">var</span> theBait, theSwitch, _ref;
theBait <span class="Keyword">=</span> <span class="Number">1000</span>; theBait <span class="Keyword">=</span> <span class="Number">1000</span>;
@ -1975,7 +1975,7 @@ mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely --
<span class="String"> cup of coffeescript</span> <span class="String"> cup of coffeescript</span>
<span class="String"> &lt;/strong&gt;</span> <span class="String"> &lt;/strong&gt;</span>
<span class="String"> <span class="String">&quot;&quot;&quot;</span></span> <span class="String"> <span class="String">&quot;&quot;&quot;</span></span>
</pre><pre class="idle"><span class="Storage">var</span> html; </pre><pre class="idle"><span class="Storage">var</span> html;
html <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>&lt;strong&gt;<span class="UserDefinedConstant">\n</span> cup of coffeescript<span class="UserDefinedConstant">\n</span>&lt;/strong&gt;<span class="String">&quot;</span></span>; html <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>&lt;strong&gt;<span class="UserDefinedConstant">\n</span> cup of coffeescript<span class="UserDefinedConstant">\n</span>&lt;/strong&gt;<span class="String">&quot;</span></span>;
@ -2148,16 +2148,12 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
a fast-paced multiplayer word game, writing both the client-side and Node.js a fast-paced multiplayer word game, writing both the client-side and Node.js
portions in CoffeeScript. portions in CoffeeScript.
</li> </li>
<li>
<a href="https://efendibooks.com/minibooks/testing-with-coffeescript">Testing with CoffeeScript</a>
is a short, succinct and freely downloadable guide to building testable applications with CoffeeScript and Jasmine.
</li>
</ul> </ul>
<h2> <h2>
Screencasts Screencasts
</h2> </h2>
<ul> <ul>
<li> <li>
<a href="http://coffeescript.codeschool.com">A Sip of CoffeeScript</a> is a <a href="http://www.codeschool.com">Code School Course</a> <a href="http://coffeescript.codeschool.com">A Sip of CoffeeScript</a> is a <a href="http://www.codeschool.com">Code School Course</a>
@ -2180,9 +2176,9 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
<h2> <h2>
Examples Examples
</h2> </h2>
<p> <p>
The <a href="https://github.com/languages/coffeescript">best list of The <a href="https://github.com/languages/coffeescript">best list of
open-source CoffeeScript examples</a> can be found on GitHub. But just open-source CoffeeScript examples</a> can be found on GitHub. But just
to throw out few more: to throw out few more:
</p> </p>
@ -2288,7 +2284,7 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
<span id="changelog" class="bookmark"></span> <span id="changelog" class="bookmark"></span>
Change Log Change Log
</h2> </h2>
<p> <p>
<b class="header" style="margin-top: 20px;"> <b class="header" style="margin-top: 20px;">
<a href="https://github.com/jashkenas/coffee-script/compare/1.3.3...1.4.0">1.4.0</a> <a href="https://github.com/jashkenas/coffee-script/compare/1.3.3...1.4.0">1.4.0</a>
@ -2296,7 +2292,7 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
</b> </b>
<ul> <ul>
<li> <li>
The CoffeeScript compiler now strips Microsoft's UTF-8 BOM if it The CoffeeScript compiler now strips Microsoft's UTF-8 BOM if it
exists, allowing you to compile BOM-borked source files. exists, allowing you to compile BOM-borked source files.
</li> </li>
<li> <li>
@ -2304,12 +2300,12 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
and moving from <tt>path.exists</tt> to <tt>fs.exists</tt>. and moving from <tt>path.exists</tt> to <tt>fs.exists</tt>.
</li> </li>
<li> <li>
Small tweaks to splat compilation, backticks, slicing, and the Small tweaks to splat compilation, backticks, slicing, and the
error for duplicate keys in object literals. error for duplicate keys in object literals.
</li> </li>
</ul> </ul>
</p> </p>
<p> <p>
<b class="header" style="margin-top: 20px;"> <b class="header" style="margin-top: 20px;">
<a href="https://github.com/jashkenas/coffee-script/compare/1.3.1...1.3.3">1.3.3</a> <a href="https://github.com/jashkenas/coffee-script/compare/1.3.1...1.3.3">1.3.3</a>
@ -2319,7 +2315,7 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
<li> <li>
Due to the new semantics of JavaScript's strict mode, CoffeeScript no Due to the new semantics of JavaScript's strict mode, CoffeeScript no
longer guarantees that constructor functions have names in all runtimes. longer guarantees that constructor functions have names in all runtimes.
See <a href="https://github.com/jashkenas/coffee-script/issues/2052">#2052</a> See <a href="https://github.com/jashkenas/coffee-script/issues/2052">#2052</a>
for discussion. for discussion.
</li> </li>
<li> <li>
@ -2338,7 +2334,7 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
</li> </li>
</ul> </ul>
</p> </p>
<p> <p>
<b class="header" style="margin-top: 20px;"> <b class="header" style="margin-top: 20px;">
<a href="https://github.com/jashkenas/coffee-script/compare/1.2.0...1.3.1">1.3.1</a> <a href="https://github.com/jashkenas/coffee-script/compare/1.2.0...1.3.1">1.3.1</a>
@ -2346,26 +2342,26 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
</b> </b>
<ul> <ul>
<li> <li>
CoffeeScript now enforces all of JavaScript's <b>Strict Mode</b> early syntax CoffeeScript now enforces all of JavaScript's <b>Strict Mode</b> early syntax
errors at compile time. This includes old-style octal literals, errors at compile time. This includes old-style octal literals,
duplicate property names in object literals, duplicate parameters in duplicate property names in object literals, duplicate parameters in
a function definition, deleting naked variables, setting the value of a function definition, deleting naked variables, setting the value of
<tt>eval</tt> or <tt>arguments</tt>, and more. <tt>eval</tt> or <tt>arguments</tt>, and more.
See a full discussion at See a full discussion at
<a href="https://github.com/jashkenas/coffee-script/issues/1547">#1547</a>. <a href="https://github.com/jashkenas/coffee-script/issues/1547">#1547</a>.
</li> </li>
<li> <li>
The REPL now has a handy new multi-line mode for entering large The REPL now has a handy new multi-line mode for entering large
blocks of code. It's useful when copy-and-pasting examples into the blocks of code. It's useful when copy-and-pasting examples into the
REPL. Enter multi-line mode with <tt>Ctrl-V</tt>. You may also now REPL. Enter multi-line mode with <tt>Ctrl-V</tt>. You may also now
pipe input directly into the REPL. pipe input directly into the REPL.
</li> </li>
<li> <li>
CoffeeScript now prints a <tt>Generated by CoffeeScript VERSION</tt> CoffeeScript now prints a <tt>Generated by CoffeeScript VERSION</tt>
header at the top of each compiled file. header at the top of each compiled file.
</li> </li>
<li> <li>
Conditional assignment of previously undefined variables Conditional assignment of previously undefined variables
<tt>a or= b</tt> is now considered a syntax error. <tt>a or= b</tt> is now considered a syntax error.
</li> </li>
<li> <li>
@ -2377,18 +2373,18 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
between them. between them.
</li> </li>
<li> <li>
Both endpoints of a slice are now allowed to be omitted for consistency, Both endpoints of a slice are now allowed to be omitted for consistency,
effectively creating a shallow copy of the list. effectively creating a shallow copy of the list.
</li> </li>
<li> <li>
Additional tweaks and improvments to <tt>coffee --watch</tt> under Additional tweaks and improvments to <tt>coffee --watch</tt> under
Node's "new" file watching API. Watch will now beep by default Node's "new" file watching API. Watch will now beep by default
if you introduce a syntax error into a watched script. We also now if you introduce a syntax error into a watched script. We also now
ignore hidden directories by default when watching recursively. ignore hidden directories by default when watching recursively.
</li> </li>
</ul> </ul>
</p> </p>
<p> <p>
<b class="header" style="margin-top: 20px;"> <b class="header" style="margin-top: 20px;">
<a href="https://github.com/jashkenas/coffee-script/compare/1.1.3...1.2.0">1.2.0</a> <a href="https://github.com/jashkenas/coffee-script/compare/1.1.3...1.2.0">1.2.0</a>
@ -2415,7 +2411,7 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
</li> </li>
</ul> </ul>
</p> </p>
<p> <p>
<b class="header" style="margin-top: 20px;"> <b class="header" style="margin-top: 20px;">
<a href="https://github.com/jashkenas/coffee-script/compare/1.1.2...1.1.3">1.1.3</a> <a href="https://github.com/jashkenas/coffee-script/compare/1.1.2...1.1.3">1.1.3</a>
@ -2427,7 +2423,7 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
out and keep it readable, as you can see in the examples on this page. out and keep it readable, as you can see in the examples on this page.
</li> </li>
<li> <li>
You can now call <tt>super</tt> in class level methods in class bodies, You can now call <tt>super</tt> in class level methods in class bodies,
and bound class methods now preserve their correct context. and bound class methods now preserve their correct context.
</li> </li>
<li> <li>
@ -2436,7 +2432,7 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
also supports binary numbers: <tt>0b10 is 2</tt>. also supports binary numbers: <tt>0b10 is 2</tt>.
</li> </li>
<li> <li>
The CoffeeScript module has been nested under a subdirectory to make The CoffeeScript module has been nested under a subdirectory to make
it easier to <tt>require</tt> individual components separately, without it easier to <tt>require</tt> individual components separately, without
having to use <b>npm</b>. For example, after adding the CoffeeScript having to use <b>npm</b>. For example, after adding the CoffeeScript
folder to your path: <tt>require('coffee-script/lexer')</tt> folder to your path: <tt>require('coffee-script/lexer')</tt>
@ -2446,11 +2442,11 @@ task(<span class="String"><span class="String">'</span>build:parser<span class="
it to get a shareable permalink for your example script. it to get a shareable permalink for your example script.
</li> </li>
<li> <li>
The <tt>coffee --watch</tt> feature now only works on Node.js 0.6.0 The <tt>coffee --watch</tt> feature now only works on Node.js 0.6.0
and higher, but now also works properly on Windows. and higher, but now also works properly on Windows.
</li> </li>
<li> <li>
Lots of small bug fixes from Lots of small bug fixes from
<b><a href="https://github.com/michaelficarra">@michaelficarra</a></b>, <b><a href="https://github.com/michaelficarra">@michaelficarra</a></b>,
<b><a href="https://github.com/geraldalewis">@geraldalewis</a></b>, <b><a href="https://github.com/geraldalewis">@geraldalewis</a></b>,
<b><a href="https://github.com/satyr">@satyr</a></b>, and <b><a href="https://github.com/satyr">@satyr</a></b>, and