From 039109ed56d3b70f6118fba86f23a98a9881e335 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Wed, 20 Apr 2011 23:08:21 -0400 Subject: [PATCH] Removing resources section from the homepage, in favor of linking to the Wiki. #1137 --- documentation/index.html.erb | 125 ++++++---------------------- documentation/js/existence.js | 10 ++- documentation/js/overview.js | 2 +- index.html | 149 +++++++++------------------------- lib/browser.js | 2 +- lib/nodes.js | 2 +- src/nodes.coffee | 4 +- 7 files changed, 74 insertions(+), 220 deletions(-) diff --git a/documentation/index.html.erb b/documentation/index.html.erb index 7a738a15..0b3bcb3c 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -923,6 +923,10 @@ Expressions

@@ -971,106 +975,23 @@ Expressions
  • CoffeeScript Issues
    - Bugs reports, feature requests, and general discussion all belong here. + Bug reports, feature proposals, and ideas for changes to the language belong here.
  • - If you'd like to chat, stop by #coffeescript on Freenode in the - IRC client of your choice, or on - webchat.freenode.net. + CoffeeScript Google Group
    + If you'd like to ask a question, the mailing list is a good place to get help.
  • - satyr's Coco - — An avant-garde dialect of CoffeeScript that frequently pioneers - features and optimizations, some of which CoffeeScript later adopts. - Check out the list of additions - to the language. + The CoffeeScript Wiki
    + If you've ever learned a neat CoffeeScript tip or trick, or ran into a gotcha — share it on the wiki. + The wiki also serves as a directory of handy + text editor extensions, + web framework plugins, + and general CoffeeScript build tools.
  • - yeungda's JCoffeeScript - — A Java Library that uses Rhino to compile CoffeeScript, allowing - compilation within Java projects or on systems that Node.js doesn't support. -
  • -
  • - defunkt's CoffeeScript Major Mode - — a Emacs major mode that provides syntax highlighting, indentation - support, and some bonus commands. -
  • -
  • - jashkenas' CoffeeScript TextMate Bundle - — which provides syntax highlighting, snippet expansion, and the - ability to run bits of CoffeeScript from within TextMate itself. -
  • -
  • - kchmck's Vim CoffeeScript - — which adds Vim syntax highlighting and indentation support. -
  • -
  • - nfiniteset's CoffeeScript.mode - — a syntax mode that provides highlighting for SubEthaEdit and Coda. -
  • -
  • - wavded's gedit-coffeescript - — a CoffeeScript syntax highlighter for the gedit text editor. -
  • -
  • - yeungda's coffeescript-idea - — a plugin for IntelliJ IDEA and RubyMine providing syntax highlighting. -
  • -
  • - dhotson's coffeescript-jedit - — which provides syntax highlighting support in jEdit. -
  • -
  • - mattly's rack-coffee - — a small Rack middleware for serving CoffeeScript files as - compiled JavaScript on the fly. -
  • -
  • - jnicklas's BistroCar - — a plugin that serves and bundles CoffeeScript from within your - Rails application. -
  • -
  • - dsc's CoffeeCup - — a Python WSGI middleware that compiles CoffeeScript to JavaScript - on-demand during development. -
  • -
  • - sutto's Barista - — a BistroCar alternative that integrates well with - Jammit and Rails 3. -
  • -
  • - inem and gerad's coffee-haml-filter - — a custom filter for rendering CoffeeScript inline within - HAML templates. -
  • -
  • - andrzejsliwa's CoffeeApp - — a CoffeeScript wrapper for CouchApps, web applications served - directly from CouchDB. -
  • -
  • - sstephenson's Eco - — high-performance embedded CoffeeScript templates, after EJS and ERB. -
  • -
  • - mauricemach's CoffeeKup - — Markup as CoffeeScript. After _why's - Markaby. -
  • -
  • - jashkenas' Docco - — a quick-and-dirty literate-programming-style documentation generator - for CoffeeScript. Used to produce the annotated source. -
  • -
  • - naturalethic's coffee-mongo - — an asynchronous MongoDB ORM, for use with Node.js and CoffeeScript. -
  • -
  • - mauricemach's Zappa - — a DSL for building web apps, built on top of Express and Socket.IO. + The FAQ
    + Perhaps your CoffeeScript-related question has been asked before. Check the FAQ first.
  • @@ -1093,17 +1014,17 @@ Expressions Change Log

    - +

    1.0.1 Jan 31, 2011 Fixed a lexer bug with Unicode identifiers. Updated REPL for compatibility with Node.js 0.3.7. Fixed requiring relative paths in the REPL. Trailing - return and return undefined are now optimized away. - Stopped requiring the core Node.js "util" module for + return and return undefined are now optimized away. + Stopped requiring the core Node.js "util" module for back-compatibility with Node.js 0.2.5. Fixed a case where a - conditional return would cause fallthrough in a switch + conditional return would cause fallthrough in a switch statement. Optimized empty objects in destructuring assignment.

    diff --git a/documentation/js/existence.js b/documentation/js/existence.js index e8631865..4dd909c3 100644 --- a/documentation/js/existence.js +++ b/documentation/js/existence.js @@ -1,6 +1,10 @@ var footprints, solipsism; -if ((typeof mind != "undefined" && mind !== null) && !(typeof world != "undefined" && world !== null)) { +if ((typeof mind != "undefined" && mind != null) && !(typeof world != "undefined" && world != null)) { solipsism = true; } -typeof speed != "undefined" && speed !== null ? speed : speed = 75; -footprints = typeof yeti != "undefined" && yeti !== null ? yeti : "bear"; \ No newline at end of file +if (typeof speed != "undefined" && speed != null) { + speed; +} else { + speed = 75; +}; +footprints = typeof yeti != "undefined" && yeti != null ? yeti : "bear"; \ No newline at end of file diff --git a/documentation/js/overview.js b/documentation/js/overview.js index 9d51f2ff..c380ac11 100644 --- a/documentation/js/overview.js +++ b/documentation/js/overview.js @@ -21,7 +21,7 @@ race = function() { winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return print(winner, runners); }; -if (typeof elvis != "undefined" && elvis !== null) { +if (typeof elvis != "undefined" && elvis != null) { alert("I knew it!"); } cubes = (function() { diff --git a/index.html b/index.html index a39100ee..c5da808d 100644 --- a/index.html +++ b/index.html @@ -170,7 +170,7 @@ math = { winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return print(winner, runners); }; -if (typeof elvis != "undefined" && elvis !== null) { +if (typeof elvis != "undefined" && elvis != null) { alert("I knew it!"); } cubes = (function() { @@ -205,7 +205,7 @@ race = function() { winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return print(winner, runners); }; -if (typeof elvis != "undefined" && elvis !== null) { +if (typeof elvis != "undefined" && elvis != null) { alert("I knew it!"); } cubes = (function() { @@ -1201,17 +1201,25 @@ footprints = yeti ?
    var footprints, solipsism;
    -if ((typeof mind != "undefined" && mind !== null) && !(typeof world != "undefined" && world !== null)) {
    +if ((typeof mind != "undefined" && mind != null) && !(typeof world != "undefined" && world != null)) {
       solipsism = true;
     }
    -typeof speed != "undefined" && speed !== null ? speed : speed = 75;
    -footprints = typeof yeti != "undefined" && yeti !== null ? yeti : "bear";
    +if (typeof speed != "undefined" && speed != null) {
    +  speed;
    +} else {
    +  speed = 75;
    +};
    +footprints = typeof yeti != "undefined" && yeti != null ? yeti : "bear";
     
    load
    run: footprints

    +if (typeof speed != "undefined" && speed != null) { + speed; +} else { + speed = 75; +}; +footprints = typeof yeti != "undefined" && yeti != null ? yeti : "bear";;alert(footprints);'>run: footprints

    The accessor variant of the existential operator ?. can be used to soak up null references in a chain of properties. Use it instead @@ -1831,6 +1839,10 @@ task('build:parserPow, + a zero-configuration Rack server, with comprehensive annotated source. +

  • frank06's riak-js, a Node.js client for Riak, with support for HTTP @@ -1840,6 +1852,10 @@ task('build:parserCoffee-Resque, a port of Resque for Node.js.
  • +
  • + assaf's Zombie.js, + A headless, full-stack, faux-browser testing library for Node.js. +
  • jashkenas' Underscore.coffee, a port of the Underscore.js @@ -1853,10 +1869,6 @@ task('build:parsernack, a Node.js-powered Rack server.
  • -
  • - sstephenson's StringScanner, - a simple tokenizer and lexical scanner for JavaScript strings. -
  • @@ -1879,106 +1891,23 @@ task('build:parserCoffeeScript Issues
    - Bugs reports, feature requests, and general discussion all belong here. + Bug reports, feature proposals, and ideas for changes to the language belong here.
  • - If you'd like to chat, stop by #coffeescript on Freenode in the - IRC client of your choice, or on - webchat.freenode.net. + CoffeeScript Google Group
    + If you'd like to ask a question, the mailing list is a good place to get help.
  • - satyr's Coco - — An avant-garde dialect of CoffeeScript that frequently pioneers - features and optimizations, some of which CoffeeScript later adopts. - Check out the list of additions - to the language. + The CoffeeScript Wiki
    + If you've ever learned a neat CoffeeScript tip or trick, or ran into a gotcha — share it on the wiki. + The wiki also serves as a directory of handy + text editor extensions, + web framework plugins, + and general CoffeeScript build tools.
  • - yeungda's JCoffeeScript - — A Java Library that uses Rhino to compile CoffeeScript, allowing - compilation within Java projects or on systems that Node.js doesn't support. -
  • -
  • - defunkt's CoffeeScript Major Mode - — a Emacs major mode that provides syntax highlighting, indentation - support, and some bonus commands. -
  • -
  • - jashkenas' CoffeeScript TextMate Bundle - — which provides syntax highlighting, snippet expansion, and the - ability to run bits of CoffeeScript from within TextMate itself. -
  • -
  • - kchmck's Vim CoffeeScript - — which adds Vim syntax highlighting and indentation support. -
  • -
  • - nfiniteset's CoffeeScript.mode - — a syntax mode that provides highlighting for SubEthaEdit and Coda. -
  • -
  • - wavded's gedit-coffeescript - — a CoffeeScript syntax highlighter for the gedit text editor. -
  • -
  • - yeungda's coffeescript-idea - — a plugin for IntelliJ IDEA and RubyMine providing syntax highlighting. -
  • -
  • - dhotson's coffeescript-jedit - — which provides syntax highlighting support in jEdit. -
  • -
  • - mattly's rack-coffee - — a small Rack middleware for serving CoffeeScript files as - compiled JavaScript on the fly. -
  • -
  • - jnicklas's BistroCar - — a plugin that serves and bundles CoffeeScript from within your - Rails application. -
  • -
  • - dsc's CoffeeCup - — a Python WSGI middleware that compiles CoffeeScript to JavaScript - on-demand during development. -
  • -
  • - sutto's Barista - — a BistroCar alternative that integrates well with - Jammit and Rails 3. -
  • -
  • - inem and gerad's coffee-haml-filter - — a custom filter for rendering CoffeeScript inline within - HAML templates. -
  • -
  • - andrzejsliwa's CoffeeApp - — a CoffeeScript wrapper for CouchApps, web applications served - directly from CouchDB. -
  • -
  • - sstephenson's Eco - — high-performance embedded CoffeeScript templates, after EJS and ERB. -
  • -
  • - mauricemach's CoffeeKup - — Markup as CoffeeScript. After _why's - Markaby. -
  • -
  • - jashkenas' Docco - — a quick-and-dirty literate-programming-style documentation generator - for CoffeeScript. Used to produce the annotated source. -
  • -
  • - naturalethic's coffee-mongo - — an asynchronous MongoDB ORM, for use with Node.js and CoffeeScript. -
  • -
  • - mauricemach's Zappa - — a DSL for building web apps, built on top of Express and Socket.IO. + The FAQ
    + Perhaps your CoffeeScript-related question has been asked before. Check the FAQ first.
  • @@ -2001,17 +1930,17 @@ task('build:parser Change Log

    - +

    1.0.1 Jan 31, 2011 Fixed a lexer bug with Unicode identifiers. Updated REPL for compatibility with Node.js 0.3.7. Fixed requiring relative paths in the REPL. Trailing - return and return undefined are now optimized away. - Stopped requiring the core Node.js "util" module for + return and return undefined are now optimized away. + Stopped requiring the core Node.js "util" module for back-compatibility with Node.js 0.2.5. Fixed a case where a - conditional return would cause fallthrough in a switch + conditional return would cause fallthrough in a switch statement. Optimized empty objects in destructuring assignment.

    diff --git a/lib/browser.js b/lib/browser.js index 1b462e7d..7d78ce38 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -12,7 +12,7 @@ options.bare = true; return Function(CoffeeScript.compile(code, options))(); }; - if (typeof window == "undefined" || window == null) { + if (typeof window == "undefined" || window === null) { return; } CoffeeScript.load = function(url, options) { diff --git a/lib/nodes.js b/lib/nodes.js index c9defbe7..8fc225c1 100644 --- a/lib/nodes.js +++ b/lib/nodes.js @@ -1802,7 +1802,7 @@ Existence.prototype.compileNode = function(o) { var code, sym; code = this.expression.compile(o, LEVEL_OP); - code = IDENTIFIER.test(code) && !o.scope.check(code) ? this.negated ? "typeof " + code + " == \"undefined\" || " + code + " == null" : "typeof " + code + " != \"undefined\" && " + code + " != null" : (sym = this.negated ? '==' : '!=', "" + code + " " + sym + " null"); + code = IDENTIFIER.test(code) && !o.scope.check(code) ? this.negated ? "typeof " + code + " == \"undefined\" || " + code + " === null" : "typeof " + code + " != \"undefined\" && " + code + " !== null" : (sym = this.negated ? '==' : '!=', "" + code + " " + sym + " null"); if (o.level <= LEVEL_COND) { return code; } else { diff --git a/src/nodes.coffee b/src/nodes.coffee index 8335bba8..88173176 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -1418,9 +1418,9 @@ exports.Existence = class Existence extends Base code = @expression.compile o, LEVEL_OP code = if IDENTIFIER.test(code) and not o.scope.check code if @negated - "typeof #{code} == \"undefined\" || #{code} == null" + "typeof #{code} == \"undefined\" || #{code} === null" else - "typeof #{code} != \"undefined\" && #{code} != null" + "typeof #{code} != \"undefined\" && #{code} !== null" else sym = if @negated then '==' else '!=' "#{code} #{sym} null"