Skip to content

Commit 05d95ac

Browse files
committed
docs for CoffeeScript 0.5.2, which is now out.
1 parent 22674bc commit 05d95ac

File tree

6 files changed

+86
-8
lines changed

6 files changed

+86
-8
lines changed

documentation/index.html.erb

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<a href="#comparisons">Chained Comparisons</a>
6161
<a href="#strings">Multiline Strings and Heredocs</a>
6262
<a href="#cake">Cake, and Cakefiles</a>
63+
<a href="#scripts">"text/coffeescript" Script Tags</a>
6364
<a href="#resources">Resources</a>
6465
<a href="#change_log">Change Log</a>
6566
</div>
@@ -107,7 +108,7 @@ alert reverse '!tpircseeffoC'</textarea>
107108

108109
<p>
109110
<b>Latest Version:</b>
110-
<a href="http://github.com/jashkenas/coffee-script/tarball/0.5.1">0.5.1</a>
111+
<a href="http://github.com/jashkenas/coffee-script/tarball/0.5.2">0.5.2</a>
111112
</p>
112113

113114
<h2>
@@ -152,7 +153,7 @@ alert reverse '!tpircseeffoC'</textarea>
152153
<a href="http://nodejs.org/">Node.js</a>, 0.1.30 or higher. Then clone the CoffeeScript
153154
<a href="http://github.com/jashkenas/coffee-script">source repository</a>
154155
from GitHub, or download the latest
155-
release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.1">0.5.1</a>.
156+
release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.2">0.5.2</a>.
156157
To install the CoffeeScript compiler system-wide
157158
under <tt>/usr/local</tt>, open the directory and run:
158159
</p>
@@ -725,6 +726,34 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
725726
</p>
726727
<%= code_for('cake_tasks') %>
727728

729+
<h2>
730+
<span id="scripts" class="bookmark"></span>
731+
"text/coffeescript" Script Tags
732+
</h2>
733+
734+
<p>
735+
While it's not recommended for serious use, CoffeeScripts may be included
736+
directly within the browser using <tt>&lt;script type="text/coffeescript"&gt;</tt>
737+
tags. The codebase includes a compressed and minified version of the compiler
738+
(<a href="extras/coffee-script.js">Download current version here, 43k when gzipped</a>).
739+
Include <tt>coffee-script.js</tt> on the page <b>after</b> any <tt>text/coffeescript</tt> tags
740+
with inline CoffeeScript, and it will compile and evaluate them in order.
741+
</p>
742+
743+
<p>
744+
In fact, the little bit of glue script that runs "Try CoffeeScript" above,
745+
as well as jQuery for the menu, is implemented in just this way.
746+
View source and look at the bottom of the page to see the example.
747+
Including the script also gives you access to <tt>CoffeeScript.compile()</tt>
748+
so you can pop open Firebug and try compiling some strings.
749+
</p>
750+
751+
<p>
752+
The usual caveats about CoffeeScript apply &mdash; your inline scripts will
753+
run within a closure wrapper, so if you want to expose global variables or
754+
functions, attach them to the <tt>window</tt> object.
755+
</p>
756+
728757
<h2>
729758
<span id="resources" class="bookmark"></span>
730759
Resources
@@ -752,6 +781,15 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
752781
<span id="change_log" class="bookmark"></span>
753782
Change Log
754783
</h2>
784+
785+
<p>
786+
<b class="header" style="margin-top: 20px;">0.5.2</b>
787+
Added a compressed version of the compiler for inclusion in web pages as
788+
<br /><tt>extras/coffee-script.js</tt>. It'll automatically run any script tags
789+
with type <tt>text/coffeescript</tt> for you. Added a <tt>--stdio</tt> option
790+
to the <tt>coffee</tt> command, for piped-in compiles.
791+
</p>
792+
755793

756794
<p>
757795
<b class="header" style="margin-top: 20px;">0.5.1</b>
@@ -954,6 +992,7 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
954992
false
955993

956994
$(document.body).click -> close_menus()
995+
957996
</script>
958997

959998
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

extras/coffee-script.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<a href="#comparisons">Chained Comparisons</a>
4747
<a href="#strings">Multiline Strings and Heredocs</a>
4848
<a href="#cake">Cake, and Cakefiles</a>
49+
<a href="#scripts">"text/coffeescript" Script Tags</a>
4950
<a href="#resources">Resources</a>
5051
<a href="#change_log">Change Log</a>
5152
</div>
@@ -93,7 +94,7 @@
9394

9495
<p>
9596
<b>Latest Version:</b>
96-
<a href="http://github.com/jashkenas/coffee-script/tarball/0.5.1">0.5.1</a>
97+
<a href="http://github.com/jashkenas/coffee-script/tarball/0.5.2">0.5.2</a>
9798
</p>
9899

99100
<h2>
@@ -249,7 +250,7 @@ <h2>
249250
<a href="http://nodejs.org/">Node.js</a>, 0.1.30 or higher. Then clone the CoffeeScript
250251
<a href="http://github.com/jashkenas/coffee-script">source repository</a>
251252
from GitHub, or download the latest
252-
release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.1">0.5.1</a>.
253+
release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.2">0.5.2</a>.
253254
To install the CoffeeScript compiler system-wide
254255
under <tt>/usr/local</tt>, open the directory and run:
255256
</p>
@@ -1605,6 +1606,34 @@ <h2>
16051606
});
16061607
</pre><br class='clear' /></div>
16071608

1609+
<h2>
1610+
<span id="scripts" class="bookmark"></span>
1611+
"text/coffeescript" Script Tags
1612+
</h2>
1613+
1614+
<p>
1615+
While it's not recommended for serious use, CoffeeScripts may be included
1616+
directly within the browser using <tt>&lt;script type="text/coffeescript"&gt;</tt>
1617+
tags. The codebase includes a compressed and minified version of the compiler
1618+
(<a href="extras/coffee-script.js">Download current version here, 43k when gzipped</a>).
1619+
Include <tt>coffee-script.js</tt> on the page <b>after</b> any <tt>text/coffeescript</tt> tags
1620+
with inline CoffeeScript, and it will compile and evaluate them in order.
1621+
</p>
1622+
1623+
<p>
1624+
In fact, the little bit of glue script that runs "Try CoffeeScript" above,
1625+
as well as jQuery for the menu, is implemented in just this way.
1626+
View source and look at the bottom of the page to see the example.
1627+
Including the script also gives you access to <tt>CoffeeScript.compile()</tt>
1628+
so you can pop open Firebug and try compiling some strings.
1629+
</p>
1630+
1631+
<p>
1632+
The usual caveats about CoffeeScript apply &mdash; your inline scripts will
1633+
run within a closure wrapper, so if you want to expose global variables or
1634+
functions, attach them to the <tt>window</tt> object.
1635+
</p>
1636+
16081637
<h2>
16091638
<span id="resources" class="bookmark"></span>
16101639
Resources
@@ -1632,6 +1661,15 @@ <h2>
16321661
<span id="change_log" class="bookmark"></span>
16331662
Change Log
16341663
</h2>
1664+
1665+
<p>
1666+
<b class="header" style="margin-top: 20px;">0.5.2</b>
1667+
Added a compressed version of the compiler for inclusion in web pages as
1668+
<br /><tt>extras/coffee-script.js</tt>. It'll automatically run any script tags
1669+
with type <tt>text/coffeescript</tt> for you. Added a <tt>--stdio</tt> option
1670+
to the <tt>coffee</tt> command, for piped-in compiles.
1671+
</p>
1672+
16351673

16361674
<p>
16371675
<b class="header" style="margin-top: 20px;">0.5.1</b>
@@ -1834,6 +1872,7 @@ <h2>
18341872
false
18351873

18361874
$(document.body).click -> close_menus()
1875+
18371876
</script>
18381877

18391878
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

lib/coffee-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
return this.pos;
3333
}
3434
};
35-
exports.VERSION = '0.5.1';
35+
exports.VERSION = '0.5.2';
3636
// Compile CoffeeScript to JavaScript, using the Coffee/Jison compiler.
3737
exports.compile = function compile(code, options) {
3838
return (parser.parse(lexer.tokenize(code))).compile(options);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"description": "Unfancy JavaScript",
44
"keywords": ["javascript", "language"],
55
"author": "Jeremy Ashkenas",
6-
"version": "0.5.1"
6+
"version": "0.5.2"
77
}

src/coffee-script.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ parser.lexer: {
2424
showPosition: -> @pos
2525
}
2626

27-
exports.VERSION: '0.5.1'
27+
exports.VERSION: '0.5.2'
2828

2929
# Compile CoffeeScript to JavaScript, using the Coffee/Jison compiler.
3030
exports.compile: (code, options) ->

0 commit comments

Comments
 (0)