Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Unfancy JavaScript
CoffeeScript JavaScript

This branch is 2 commits ahead, 1344 commits behind jashkenas:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
documentation
examples
extras
lib/coffee-script
src
test
.gitignore
.npmignore
Cakefile
LICENSE
README
Rakefile
index.html
package.json

README

First cut at a Stratified CoffeeScript compiler.
================================================

- Compiles to StratifiedJS (http://onilabs.com/stratifiedjs)

- Supports the following constructs:

Stratified CoffeeScript  -->     StratifiedJS
-----------------------          ------------

waitfor                  -->     waitfor () {
  asyncFunc resume                 asyncFunc(resume)
                                 }

waitfor rv               -->     waitfor (rv) {
  asyncFunc resume                 asyncFunc(resume)
                                 }

waitfor                  -->     waitfor {
  foo a                            foo(a);
then                             }
  bar x                          and {
                                   bar(x);
                                 }

waitfor                  -->     waitfor {
  foo a                            foo(a);
else                             }
  bar x                          or {
                                   bar(x);
                                 }

try                      -->     try {
  foo a                            foo(a);
retract                          }
  cleanup a                      retract {
                                   cleanup(a);
                                 }

- You can use catch/retract/finally also directly after waitfor, e.g.:

waitfor                   -->   waitfor () {
  id = setTimeout resume,         var id = setTimeout(resume,1000);
         1000                   }
retract                         retract {
  cancelTimeout id                cancelTimeout(id);
                                }

- NOTE THE USE OF 'then' AND 'else' INSTEAD OF 'and'/'or'. Ideally we
  would like 'and'/'or' also in CoffeeScript, but they are kinda hard to
  parse, because CoffeeScript uses them for other stuff as well.



ORIGINAL README CONTENTS:
=========================

            {
         }   }   {
        {   {  }  }
         }   }{  {
        {  }{  }  }                    _____       __  __
       ( }{ }{  { )                   / ____|     / _|/ _|
     .- { { }  { }} -.               | |     ___ | |_| |_ ___  ___
    (  ( } { } { } }  )              | |    / _ \|  _|  _/ _ \/ _ \
    |`-..________ ..-'|              | |___| (_) | | | ||  __/  __/
    |                 |               \_____\___/|_| |_| \___|\___|
    |                 ;--.
    |                (__  \            _____           _       _
    |                 | )  )          / ____|         (_)     | |
    |                 |/  /          | (___   ___ _ __ _ _ __ | |_
    |                 (  /            \___ \ / __| '__| | '_ \| __|
    |                 |/              ____) | (__| |  | | |_) | |_
    |                 |              |_____/ \___|_|  |_| .__/ \__|
     `-.._________..-'                                  | |
                                                        |_|


  CoffeeScript is a little language that compiles into JavaScript.

  Install Node.js, and then the CoffeeScript compiler:
  sudo bin/cake install

  Or, if you have the Node Package Manager installed:
  npm install -g coffee-script
  (Leave off the -g if you don't wish to install globally.)

  Execute a script:
  coffee /path/to/script.coffee

  Compile a script:
  coffee -c /path/to/script.coffee

  For documentation, usage, and examples, see:
  http://coffeescript.org/

  To suggest a feature, report a bug, or general discussion:
  http://github.com/jashkenas/coffee-script/issues/

  If you'd like to chat, drop by #coffeescript on Freenode IRC,
  or on webchat.freenode.net.

  The source repository:
  git://github.com/jashkenas/coffee-script.git

  All contributors are listed here:
  http://github.com/jashkenas/coffee-script/contributors
Something went wrong with that request. Please try again.