|
693 | 693 | <section id="introduction">
|
694 | 694 | <p><strong>CoffeeScript is a little language that compiles into JavaScript.</strong> Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.</p>
|
695 | 695 | <p>The golden rule of CoffeeScript is: <em>“It’s just JavaScript.”</em> The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable, pretty-printed, and tends to run as fast or faster than the equivalent handwritten JavaScript.</p>
|
696 |
| -<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.4.0">2.4.0</a></p> |
| 696 | +<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.4.1">2.4.1</a></p> |
697 | 697 | <blockquote class="uneditable-code-block"><pre><code class="language-bash"><span class="comment"># Install locally for a project:</span>
|
698 | 698 | npm install --save-dev coffeescript
|
699 | 699 |
|
@@ -1399,7 +1399,7 @@ <h2>Objects and Arrays</h2>
|
1399 | 1399 | </div>
|
1400 | 1400 |
|
1401 | 1401 | </aside>
|
1402 |
| -<p>CoffeeScript has a shortcut for creating objects when you want the key to be set with a variable of the same name.</p> |
| 1402 | +<p>CoffeeScript has a shortcut for creating objects when you want the key to be set with a variable of the same name. Note that the <code>{</code> and <code>}</code> are required for this shorthand.</p> |
1403 | 1403 | <aside class="code-example container-fluid bg-ribbed-dark" data-example="objects_shorthand">
|
1404 | 1404 | <div class="row">
|
1405 | 1405 | <div class="col-md-6 coffeescript-input-column">
|
@@ -4834,7 +4834,7 @@ <h2>Cake, and Cakefiles</h2>
|
4834 | 4834 | </section>
|
4835 | 4835 | <section id="scripts">
|
4836 | 4836 | <h2><code>"text/coffeescript"</code> Script Tags</h2>
|
4837 |
| -<p>While it’s not recommended for serious use, CoffeeScripts may be included directly within the browser using <code><script type="text/coffeescript"></code> tags. The source includes a compressed and minified version of the compiler (<a href="/v2/browser-compiler-legacy/coffeescript.js">Download current version here, 51k when gzipped</a>) as <code>docs/v2/browser-compiler-legacy/coffeescript.js</code>. Include this file on a page with inline CoffeeScript tags, and it will compile and evaluate them in order.</p> |
| 4837 | +<p>While it’s not recommended for serious use, CoffeeScripts may be included directly within the browser using <code><script type="text/coffeescript"></code> tags. The source includes a compressed and minified version of the compiler (<a href="/v2/browser-compiler-legacy/coffeescript.js">Download current version here, 77k when gzipped</a>) as <code>docs/v2/browser-compiler-legacy/coffeescript.js</code>. Include this file on a page with inline CoffeeScript tags, and it will compile and evaluate them in order.</p> |
4838 | 4838 | <p>The usual caveats about CoffeeScript apply — your inline scripts will run within a closure wrapper, so if you want to expose global variables or functions, attach them to the <code>window</code> object.</p>
|
4839 | 4839 |
|
4840 | 4840 | </section>
|
@@ -4901,7 +4901,7 @@ <h2>Web Chat (IRC)</h2>
|
4901 | 4901 | </section>
|
4902 | 4902 | <section id="annotated-source">
|
4903 | 4903 | <h2>Annotated Source</h2>
|
4904 |
| -<p>You can browse the CoffeeScript 2.4.0 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p> |
| 4904 | +<p>You can browse the CoffeeScript 2.4.1 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p> |
4905 | 4905 | <ul>
|
4906 | 4906 | <li><a href="annotated-source/grammar.html">Grammar Rules — src/grammar</a></li>
|
4907 | 4907 | <li><a href="annotated-source/lexer.html">Lexing Tokens — src/lexer</a></li>
|
@@ -5579,6 +5579,14 @@ <h3>Argument parsing and shebang (<code>#!</code>) lines</h3>
|
5579 | 5579 | <section id="changelog">
|
5580 | 5580 | <h2>Changelog</h2>
|
5581 | 5581 |
|
| 5582 | + <section id="2.4.1"> |
| 5583 | + <h3><a href="https://github.com/jashkenas/coffeescript/compare/2.4.0...2.4.1">2.4.1</a> |
| 5584 | + <span class="timestamp"> — <time datetime="2019-04-08">2019-04-08</time></span> |
| 5585 | +</h3><ul> |
| 5586 | +<li>Both the <a href="/browser-compiler-legacy/coffeescript.js">traditional ES5</a> and <a href="/browser-compiler-modern/coffeescript.js">modern ES module</a> versions of the CoffeeScript broswer compiler are now published to NPM, enabling the browser compilers’ use via services that provide NPM modules’ code available via public CDN. The traditional version is referenced via the <code>package.json</code> <code>"browser"</code> field, and the ES module version via the <code>"module"</code> field.</li> |
| 5587 | +</ul> |
| 5588 | + |
| 5589 | + </section> |
5582 | 5590 | <section id="2.4.0">
|
5583 | 5591 | <h3><a href="https://github.com/jashkenas/coffeescript/compare/2.3.2...2.4.0">2.4.0</a>
|
5584 | 5592 | <span class="timestamp"> — <time datetime="2019-03-29">2019-03-29</time></span>
|
|
0 commit comments