Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 19 commits
  • 26 files changed
  • 3 commit comments
  • 3 contributors
Commits on Feb 28, 2010
@jashkenas If you don't specify a constructor, one will be provided for you by t…
…he state.
56eb474
@jashkenas removing the (now-unused) inherits helper, and adding a helper for cr…
…eating LiteralNodes
fec2eae
@jashkenas updating docs to say 'Node.js greater than 0.1.30' 47f71f9
@jashkenas fixing heredocs with multiple double quotes (broken regex from the Ru…
…by translation), with tests.
b08995c
@jashkenas fixing require paths in the Cakefile so that build:jison will work, e…
…ven if you don't have it installed.
2969e15
@jashkenas allowing chaining of property accesses by indentation level (really n…
…ice for Node and jQuery work) ticket #221
bb2bf7c
@jashkenas a number of refactors to the Lexer. It should be a good bit clearer t…
…o read now.
969c2e5
@jashkenas updating Underscore.coffee to Underscore.js version 0.6.0 30cf63e
Commits on Mar 01, 2010
@jashkenas defining __filename and __dirname correctly as local variables for ev…
…al'd scripts
45bad55
@jashkenas better commenting the coffeescript lexer as the first trial for docco 29ece0e
@jashkenas couple more tweaks to lexer.coffee cd6dd5a
Commits on Mar 02, 2010
@jashkenas removing special rule from rewriter for naked functions in arrays c219adf
@jashkenas rebuilding extras/coffee-script.js 70cb195
Commits on Mar 03, 2010
@jashkenas improvement to comment handling that should ensure that they have no …
…effect on indentation
5fd0972
@srijs srijs fix: process.watchFile has moved to fs.watchFile c11c3ed
@srijs srijs updated command_line.js 707cd2d
@cehoffman cehoffman Use new node api for resolving a chain of symlinks f7183e6
Commits on Mar 04, 2010
@jashkenas Merge branch 'path_fix' of git://github.com/cehoffman/coffee-script 3feb874
@jashkenas Updating docs for CoffeeScript 0.5.4. Tag it and bag it. 44398d0
View
@@ -29,6 +29,7 @@ task 'build', 'build the CoffeeScript language from source', ->
task 'build:parser', 'rebuild the Jison parser (run build first)', ->
+ require.paths.unshift 'vendor/jison/lib'
parser: require('grammar').parser
js: parser.generate()
parser_path: 'lib/parser.js'
@@ -45,7 +46,8 @@ task 'build:underscore', 'rebuild the Underscore.coffee documentation page', ->
task 'build:browser', 'rebuild the merged script for inclusion in the browser', ->
- exec 'rake browser'
+ exec 'rake browser', (err) ->
+ throw err if err
task 'doc', 'watch and continually rebuild the documentation', ->
View
@@ -3,13 +3,7 @@
process.mixin(require('sys'));
var path = require('path');
var fs = require('fs');
-var lib = null;
-
-if (fs.lstatSync(__filename).isSymbolicLink()) {
- lib = path.join(path.dirname(fs.readlinkSync(__filename)), '../lib');
-} else {
- lib = path.join(__dirname, '../lib');
-}
+var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require.paths.unshift(lib);
require('cake').run();
View
@@ -3,13 +3,7 @@
process.mixin(require('sys'));
var path = require('path');
var fs = require('fs');
-var lib = null;
-
-if (fs.lstatSync(__filename).isSymbolicLink()) {
- lib = path.join(path.dirname(fs.readlinkSync(__filename)), '../lib');
-} else {
- lib = path.join(__dirname, '../lib');
-}
+var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require.paths.unshift(lib);
require('command_line').run();
@@ -111,7 +111,7 @@ alert reverse '!tpircseeffoC'</textarea></div>
<p>
<b>Latest Version:</b>
- <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.3">0.5.3</a>
+ <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.4">0.5.4</a>
</p>
<h2>
@@ -153,10 +153,12 @@ alert reverse '!tpircseeffoC'</textarea></div>
<p>
To install, first make sure you have a working version of
- <a href="http://nodejs.org/">Node.js</a>, 0.1.30 or higher. Then clone the CoffeeScript
+ <a href="http://nodejs.org/">Node.js</a> greater than version 0.1.30 (Node
+ moves quickly, using the latest master is your best bet).
+ Then clone the CoffeeScript
<a href="http://github.com/jashkenas/coffee-script">source repository</a>
from GitHub, or download the latest
- release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.3">0.5.3</a>.
+ release: <a href="http://github.com/jashkenas/coffee-script/tarball/0.5.4">0.5.4</a>.
To install the CoffeeScript compiler system-wide
under <tt>/usr/local</tt>, open the directory and run:
</p>
@@ -796,6 +798,13 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
</h2>
<p>
+ <b class="header" style="margin-top: 20px;">0.5.4</b>
+ Bugfix that corrects the Node.js global constants <tt>__filename</tt> and
+ <tt>__dirname</tt>. Tweaks for more flexible parsing of nested function
+ literals and improperly-indented comments. Updates for the latest Node.js API.
+ </p>
+
+ <p>
<b class="header" style="margin-top: 20px;">0.5.3</b>
CoffeeScript now has a syntax for defining classes. Many of the core
components (Nodes, Lexer, Rewriter, Scope, Optparse) are using them.
Oops, something went wrong.
Oops, something went wrong.

Showing you all comments on commits in this comparison.

@mrjjwright

Was trying to figure out the exact syntax addition from this one, are there updated docs or could you give me a gist?

@jashkenas
Owner

No updated docs yet (I'm not sure if it should be encouraged or not), but this lets you leave off the parentheses against multiple chained calls. See Tesco's excellent ticket that proposed it:

http://github.com/jashkenas/coffee-script/issues/closed#issue/221

In effect, before you had to do this:

$('.rows')
  .each(
    ...
  ).click(
    ...
  )

And now you can just do this:

$('.rows')
  .each
    ...
  .click
    ...
@defunkt
defunkt commented on 45bad55 Mar 1, 2010

Sweet! Just ran into problems with __filename the other day, this fixes it.