incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmue...@apache.org
Subject [1/6] weinre commit: [CB-984] [weinre] weinre broken with node 0.8
Date Fri, 29 Jun 2012 14:42:29 GMT
Updated Branches:
  refs/heads/master f277c2e25 -> 4d3b995fd


[CB-984] [weinre] weinre broken with node 0.8

    https://issues.apache.org/jira/browse/CB-984

* swapped grunt for wr
* updated pre-req versions (esp express)
* changes for path/fs.existsSync()
* print node version info verbosely at startup


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/commit/4d3b995f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/tree/4d3b995f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/diff/4d3b995f

Branch: refs/heads/master
Commit: 4d3b995fd084c037e7eea2c430e174d3e3ef1e4c
Parents: f277c2e
Author: Patrick Mueller <pmuellr@apache.org>
Authored: Fri Jun 29 10:38:30 2012 -0400
Committer: Patrick Mueller <pmuellr@apache.org>
Committed: Fri Jun 29 10:38:30 2012 -0400

----------------------------------------------------------------------
 .wr                                                |   35 -
 README.md                                          |   11 +-
 grunt.js                                           |   86 +
 weinre.build/package.json.template                 |    8 +-
 weinre.doc/ChangeLog.body.html                     |    2 +
 weinre.server/lib/cli.coffee                       |    2 +-
 weinre.server/lib/serviceManager.coffee            |    2 +-
 weinre.server/lib/utils.coffee                     |   41 +-
 weinre.server/lib/weinre.coffee                    |   25 +-
 weinre.server/node_modules/.bin/cake               |    2 +-
 weinre.server/node_modules/.bin/coffee             |    2 +-
 weinre.server/node_modules/.bin/express            |    2 +-
 weinre.server/node_modules/.bin/nopt               |    2 +-
 weinre.server/node_modules/coffee-script/CNAME     |    1 +
 weinre.server/node_modules/coffee-script/LICENSE   |    2 +-
 .../coffee-script/lib/coffee-script/browser.js     |   30 +-
 .../coffee-script/lib/coffee-script/cake.js        |   28 +-
 .../lib/coffee-script/coffee-script.js             |   57 +-
 .../coffee-script/lib/coffee-script/command.js     |  232 +-
 .../coffee-script/lib/coffee-script/grammar.js     |   36 +-
 .../coffee-script/lib/coffee-script/helpers.js     |    9 +-
 .../coffee-script/lib/coffee-script/index.js       |    1 +
 .../coffee-script/lib/coffee-script/lexer.js       |  278 +-
 .../coffee-script/lib/coffee-script/nodes.js       |  936 ++++--
 .../coffee-script/lib/coffee-script/optparse.js    |   72 +-
 .../coffee-script/lib/coffee-script/parser.js      |  347 +-
 .../coffee-script/lib/coffee-script/repl.js        |  220 +-
 .../coffee-script/lib/coffee-script/rewriter.js    |  136 +-
 .../coffee-script/lib/coffee-script/scope.js       |   76 +-
 .../node_modules/coffee-script/package.json        |   57 +-
 weinre.server/node_modules/express/History.md      |   18 +
 weinre.server/node_modules/express/bin/express     |   13 +-
 weinre.server/node_modules/express/lib/express.js  |    2 +-
 weinre.server/node_modules/express/lib/request.js  |   25 +-
 weinre.server/node_modules/express/lib/response.js |    5 +-
 .../node_modules/express/lib/router/methods.js     |   11 +-
 .../express/node_modules/connect/lib/connect.js    |    2 +-
 .../express/node_modules/connect/lib/http.js       |    5 +-
 .../connect/lib/middleware/compress.js             |  146 +
 .../node_modules/connect/lib/middleware/limit.js   |    2 -
 .../node_modules/connect/lib/middleware/session.js |    3 +-
 .../connect/node_modules/formidable/Readme.md      |   10 +-
 .../connect/node_modules/formidable/lib/file.js    |   16 +-
 .../node_modules/formidable/lib/incoming_form.js   |   20 +-
 .../node_modules/formidable/node-gently/Makefile   |    4 +
 .../node_modules/formidable/node-gently/Readme.md  |  167 +
 .../formidable/node-gently/example/dog.js          |   22 +
 .../node-gently/example/event_emitter.js           |   11 +
 .../node_modules/formidable/node-gently/index.js   |    1 +
 .../formidable/node-gently/lib/gently/gently.js    |  184 +
 .../formidable/node-gently/lib/gently/index.js     |    1 +
 .../formidable/node-gently/package.json            |   14 +
 .../formidable/node-gently/test/common.js          |    8 +
 .../node-gently/test/simple/test-gently.js         |  348 ++
 .../connect/node_modules/formidable/package.json   |    9 +-
 .../test/legacy/simple/test-incoming-form.js       |    5 +-
 .../test/legacy/system/test-multi-video-upload.js  |    3 +
 .../formidable/test/unit/test-incoming-form.js     |    2 +-
 .../express/node_modules/connect/package.json      |   30 +-
 .../express/node_modules/connect/test.js           |   72 +-
 .../express/node_modules/mime/README.md            |   29 +-
 .../node_modules/express/node_modules/mime/mime.js |   11 +-
 .../express/node_modules/mime/package.json         |   30 +-
 .../node_modules/express/node_modules/mime/test.js |  102 +-
 .../express/node_modules/mime/types/mime.types     |   31 -
 .../express/node_modules/mime/types/node.types     |    5 -
 .../express/node_modules/mkdirp/.gitignore         |    2 -
 .../express/node_modules/mkdirp/.npmignore         |    2 +
 .../express/node_modules/mkdirp/README.markdown    |   37 +-
 .../express/node_modules/mkdirp/examples/pow.js    |    2 +-
 .../express/node_modules/mkdirp/index.js           |   85 +-
 .../express/node_modules/mkdirp/package.json       |   54 +-
 .../express/node_modules/mkdirp/test/chmod.js      |   38 +
 .../express/node_modules/mkdirp/test/clobber.js    |   37 +
 .../express/node_modules/mkdirp/test/perm.js       |   32 +
 .../express/node_modules/mkdirp/test/perm_sync.js  |   39 +
 .../express/node_modules/mkdirp/test/sync.js       |   27 +
 .../express/node_modules/mkdirp/test/umask.js      |   28 +
 .../express/node_modules/mkdirp/test/umask_sync.js |   27 +
 .../express/node_modules/qs/package.json           |   22 +-
 weinre.server/node_modules/express/package.json    |   59 +-
 weinre.server/node_modules/express/test.js         |    9 +
 .../node_modules/express/testing/foo/app.js        |   35 -
 .../node_modules/express/testing/foo/package.json  |    9 -
 .../testing/foo/public/stylesheets/style.css       |    8 -
 .../express/testing/foo/routes/index.js            |   10 -
 .../express/testing/foo/views/index.jade           |    2 -
 .../express/testing/foo/views/layout.jade          |    6 -
 .../node_modules/express/testing/index.js          |   43 -
 .../node_modules/express/testing/public/test.txt   | 2971 ---------------
 .../node_modules/express/testing/views/page.html   |    1 -
 .../node_modules/express/testing/views/page.jade   |    3 -
 .../node_modules/express/testing/views/test.md     |    1 -
 .../express/testing/views/user/index.jade          |    1 -
 .../express/testing/views/user/list.jade           |    1 -
 .../nopt/node_modules/abbrev/package.json          |   26 +-
 weinre.server/node_modules/nopt/package.json       |   43 +-
 weinre.server/node_modules/underscore/CNAME        |    1 +
 weinre.server/node_modules/underscore/favicon.ico  |  Bin 0 -> 1406 bytes
 weinre.server/node_modules/underscore/index.html   |  362 ++-
 weinre.server/node_modules/underscore/package.json |   31 +-
 .../node_modules/underscore/underscore-min.js      |   51 +-
 .../node_modules/underscore/underscore.js          |  180 +-
 103 files changed, 3944 insertions(+), 4446 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/.wr
----------------------------------------------------------------------
diff --git a/.wr b/.wr
deleted file mode 100644
index 797e61e..0000000
--- a/.wr
+++ /dev/null
@@ -1,35 +0,0 @@
-# ---
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ---
-
---stdoutcolor blue
---stderrcolor red
-
-ant -f weinre.build/build.xml
-
-weinre.build/build.xml
-weinre.build/build.properties
-weinre.build/scripts
-weinre.doc
-weinre.server/interfaces
-weinre.server/lib
-weinre.server/README.md
-weinre.server/weinre
-weinre.server/weinre-hot
-weinre.web
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 1640426..625c63c 100644
--- a/README.md
+++ b/README.md
@@ -124,8 +124,9 @@ build the archives.
 
 ### other fun development-time hacks ###
 
-If you have the [wr tool](https://github.com/pmuellr/wr) installed, there is
-a `.wr` file available to run the development builds.
+If you have the [grunt tool](https://github.com/cowboy/grunt) installed, there is
+a `grunt.js` file available to run the development builds when a source file
+changes.
 
 The build is growl-enabled, so you can see a quick message when the build 
 completes, as long as the `USE_GROWL` property is set in the 
@@ -136,8 +137,8 @@ The command `weinre.server/weinre-hot` makes use of
 weinre server generated by the development build, whenever a weinre build
 completes.
 
-Putting this altogether, you can open two terminal windows, run `wr` in the 
-`weinre.build` directory to have a development build run whenever you change 
+Putting this altogether, you can open two terminal windows, run `grunt` in the 
+main directory to have a development build run whenever you change 
 the source, and then run `weinre-hot` in the `weinre.server` directory to have 
 the weinre server restart whenever a build completes, getting a growl 
 notification at that time.
@@ -163,6 +164,7 @@ To update the files in `weinre.build/vendor`:
 
 * edit the file `weinre.build/vendor.properties` as appropriate
 * run: `cd weinre.build`
+* run: `rm -rf vendor`
 * run: `ant -f update.vendor.xml`
 
 To update the files in `weinre.server/node_modules`:
@@ -171,4 +173,5 @@ To update the files in `weinre.server/node_modules`:
 * run a build (see above), so that the file `weinre.server/package.json` file is created
 from the template you edited above
 * run: `cd weinre.server`
+* run: `rm -rf node_modules`
 * run: `npm install`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/grunt.js
----------------------------------------------------------------------
diff --git a/grunt.js b/grunt.js
new file mode 100644
index 0000000..0876003
--- /dev/null
+++ b/grunt.js
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// open "http://search.npmjs.org/#/grunt" ; sudo npm -g install grunt
+
+var child_process = require("child_process")
+
+//------------------------------------------------------------------------------
+// list of source files to watch
+//------------------------------------------------------------------------------
+var sourceFiles = [
+    "grunt.js",
+    
+    "weinre.build/*.sh", 
+    "weinre.build/*.properties", 
+    "weinre.build/*.xml", 
+    "weinre.build/*.template", 
+    "weinre.build/scripts/**/*", 
+    
+    "weinre.doc/**/*",
+    
+    "weinre.server/interfaces/**/*",
+    "weinre.server/lib/**/*",
+    "weinre.server/package.json",
+    "weinre.server/README.md",
+
+    "weinre.web/**/*"
+]
+
+//------------------------------------------------------------------------------
+var gruntConfig = {
+    watch: {
+        make: {
+            files: sourceFiles,
+            tasks: ["runAnt"]
+        }
+    }
+}
+
+//------------------------------------------------------------------------------
+module.exports = function(grunt) {
+    grunt.initConfig(gruntConfig)
+    
+    grunt.registerTask("default", "watch")
+    grunt.registerTask("runAnt", "run ant", function(){task_runAnt(this, grunt)})
+}
+
+//------------------------------------------------------------------------------
+// run "make"
+//------------------------------------------------------------------------------
+function task_runAnt(task, grunt) {
+    var done = task.async()
+    var make = child_process.spawn('ant', ['-f', 'weinre.build/build.xml'])
+    
+    make.stdout.on("data", function(data) {
+        grunt.log.write("" + data)
+    })
+    
+    make.stderr.on("data", function(data) {
+        grunt.log.error("" + data)
+    })
+    
+    make.on("exit", function(code) {
+        if (code === 0) return done(true)
+        
+        grunt.log.writeln("error running ant", code)
+        return done(false)
+    })
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.build/package.json.template
----------------------------------------------------------------------
diff --git a/weinre.build/package.json.template b/weinre.build/package.json.template
index 5b482b3..15d21e0 100644
--- a/weinre.build/package.json.template
+++ b/weinre.build/package.json.template
@@ -21,10 +21,10 @@
     },
   "dependencies":
     {
-      "coffee-script": "1.2.0",
-      "express":       "2.5.7",
-      "nopt":          "1.0.10",
-      "underscore":    "1.3.1"
+      "coffee-script": "1.3.x",
+      "express":       "2.5.x",
+      "nopt":          "1.0.x",
+      "underscore":    "1.3.x"
     },
   "main" :             "./lib/weinre",
   "bin":

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.doc/ChangeLog.body.html
----------------------------------------------------------------------
diff --git a/weinre.doc/ChangeLog.body.html b/weinre.doc/ChangeLog.body.html
index b5167a7..1d2e0ad 100644
--- a/weinre.doc/ChangeLog.body.html
+++ b/weinre.doc/ChangeLog.body.html
@@ -45,6 +45,8 @@
 <li><a href="https://issues.apache.org/jira/browse/CB-294">CB-294</a>  - various exceptions thrown in the target in WeinreTargetEventsImpl.connectionCreated()
 <li><a href="https://issues.apache.org/jira/browse/CB-315">CB-315</a>  - generate valid Apache release artifact names
 <li><a href="https://issues.apache.org/jira/browse/CB-540">CB-540</a>  - ability to easily navigate to particular place in DOM via bookmarks/jump to selector
+<li><a href="https://issues.apache.org/jira/browse/CB-873">CB-873</a>  - setTimeout() and setInterval() usage with string arguments is busted
+<li><a href="https://issues.apache.org/jira/browse/CB-984">CB-984</a>  - cannot install weinre with Node 0.8.0
 </ul>
 
 <!-- ======================================================================= -->

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/lib/cli.coffee
----------------------------------------------------------------------
diff --git a/weinre.server/lib/cli.coffee b/weinre.server/lib/cli.coffee
index f34ddeb..390d280 100644
--- a/weinre.server/lib/cli.coffee
+++ b/weinre.server/lib/cli.coffee
@@ -104,7 +104,7 @@ getDotWeinreServerProperties = () ->
     properties = {}
     
     fileName = replaceTilde '~/.weinre/server.properties'
-    return properties if !path.existsSync(fileName)
+    return properties if !utils.fileExistsSync(fileName)
     
     contents = fs.readFileSync(fileName, 'utf8')
     lines    = contents.split('\n')

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/lib/serviceManager.coffee
----------------------------------------------------------------------
diff --git a/weinre.server/lib/serviceManager.coffee b/weinre.server/lib/serviceManager.coffee
index 2a9f6c8..ade070f 100644
--- a/weinre.server/lib/serviceManager.coffee
+++ b/weinre.server/lib/serviceManager.coffee
@@ -83,7 +83,7 @@ getServiceInterface = (name) ->
     jsonName = "#{name}.json"
     fileName = path.join utils.options.staticWebDir, 'interfaces', jsonName
     
-    return null if !path.existsSync(fileName) 
+    return null if !utils.fileExistsSync(fileName) 
     
     contents = fs.readFileSync(fileName, 'utf8')
     

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/lib/utils.coffee
----------------------------------------------------------------------
diff --git a/weinre.server/lib/utils.coffee b/weinre.server/lib/utils.coffee
index 2225d22..ee5a72b 100644
--- a/weinre.server/lib/utils.coffee
+++ b/weinre.server/lib/utils.coffee
@@ -17,6 +17,7 @@
 # under the License.
 #-------------------------------------------------------------------------------
 
+fs   = require 'fs'
 path = require 'path'
 
 utils = exports
@@ -123,6 +124,28 @@ utils.registerClass = (aClass) ->
     aClass
 
 #-------------------------------------------------------------------------------
+utils.alignLeft = (string, length) ->
+    while string.length < length
+        string = "#{string} "
+        
+    string
+
+#-------------------------------------------------------------------------------
+utils.alignRight = (string, length) ->
+    while string.length < length
+        string = " #{string}"
+
+    string
+
+#-------------------------------------------------------------------------------
+utils.fileExistsSync = (name) ->
+    
+    if fs.existsSync
+        return fs.existsSync name
+        
+    return path.existsSync(name)
+
+#-------------------------------------------------------------------------------
 Error.prepareStackTrace = (error, structuredStackTrace) ->
     result = []
     result.push "---------------------------------------------------------"
@@ -154,8 +177,8 @@ Error.prepareStackTrace = (error, structuredStackTrace) ->
         file = path.basename(file)
         line = "#{line}"
         
-        file = alignRight(file, longestFile)
-        line = alignLeft( line, longestLine)
+        file = utils.alignRight(file, longestFile)
+        line = utils.alignLeft( line, longestLine)
         
         funcName = func.displayName ||
                    func.name || 
@@ -171,17 +194,3 @@ Error.prepareStackTrace = (error, structuredStackTrace) ->
         result.push "   #{file}:#{line} - #{funcName}()"
         
     result.join "\n"
-
-#-------------------------------------------------------------------------------
-alignLeft = (string, length) ->
-    while string.length < length
-        string = "#{string} "
-        
-    string
-
-#-------------------------------------------------------------------------------
-alignRight = (string, length) ->
-    while string.length < length
-        string = " #{string}"
-
-    string

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/lib/weinre.coffee
----------------------------------------------------------------------
diff --git a/weinre.server/lib/weinre.coffee b/weinre.server/lib/weinre.coffee
index 6027d05..8b7945d 100644
--- a/weinre.server/lib/weinre.coffee
+++ b/weinre.server/lib/weinre.coffee
@@ -22,6 +22,7 @@ net  = require 'net'
 dns  = require 'dns'
 path = require 'path'
 
+_       = require 'underscore'
 express = require 'express'
 
 utils              = require './utils'
@@ -63,12 +64,22 @@ processOptions = (options, cb) ->
     
     utils.logVerbose "pid:                 #{process.pid}"
     utils.logVerbose "version:             #{getVersion()}"
-    utils.logVerbose "option httpPort:     #{options.httpPort}"
-    utils.logVerbose "option boundHost:    #{options.boundHost}"
-    utils.logVerbose "option verbose:      #{options.verbose}"
-    utils.logVerbose "option debug:        #{options.debug}"
-    utils.logVerbose "option readTimeout:  #{options.readTimeout}"
-    utils.logVerbose "option deathTimeout: #{options.deathTimeout}"
+    utils.logVerbose "node versions:"
+    
+    names   = _.keys(process.versions)
+    reducer = (memo, name) -> Math.max(memo, name.length)
+    nameLen = _.reduce(names, reducer, 0)
+    
+    for name in names
+        utils.logVerbose "   #{utils.alignLeft(name, nameLen)}: #{process.versions[name]}"
+    
+    utils.logVerbose "options:"
+    utils.logVerbose "   httpPort:     #{options.httpPort}"
+    utils.logVerbose "   boundHost:    #{options.boundHost}"
+    utils.logVerbose "   verbose:      #{options.verbose}"
+    utils.logVerbose "   debug:        #{options.debug}"
+    utils.logVerbose "   readTimeout:  #{options.readTimeout}"
+    utils.logVerbose "   deathTimeout: #{options.deathTimeout}"
 
     utils.setOptions options
 
@@ -157,7 +168,7 @@ startServer = () ->
 #-------------------------------------------------------------------------------
 getStaticWebDir = () ->
     webDir = path.normalize path.join(__dirname,'../web')
-    return webDir if path.existsSync webDir
+    return webDir if utils.fileExistsSync webDir
     
     utils.exit 'unable to find static files to serve in #{webDir}; did you do a build?'
     

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/.bin/cake
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/.bin/cake b/weinre.server/node_modules/.bin/cake
index d95f32a..0b37b91 120000
--- a/weinre.server/node_modules/.bin/cake
+++ b/weinre.server/node_modules/.bin/cake
@@ -1 +1 @@
-../coffee-script/bin/cake
\ No newline at end of file
+/Users/pmuellr/Projects/incubator-cordova-weinre/weinre.server/node_modules/coffee-script/bin/cake
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/.bin/coffee
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/.bin/coffee b/weinre.server/node_modules/.bin/coffee
index b57f275..70a193a 120000
--- a/weinre.server/node_modules/.bin/coffee
+++ b/weinre.server/node_modules/.bin/coffee
@@ -1 +1 @@
-../coffee-script/bin/coffee
\ No newline at end of file
+/Users/pmuellr/Projects/incubator-cordova-weinre/weinre.server/node_modules/coffee-script/bin/coffee
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/.bin/express
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/.bin/express b/weinre.server/node_modules/.bin/express
index b741d99..57a31fa 120000
--- a/weinre.server/node_modules/.bin/express
+++ b/weinre.server/node_modules/.bin/express
@@ -1 +1 @@
-../express/bin/express
\ No newline at end of file
+/Users/pmuellr/Projects/incubator-cordova-weinre/weinre.server/node_modules/express/bin/express
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/.bin/nopt
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/.bin/nopt b/weinre.server/node_modules/.bin/nopt
index 6b6566e..f50226a 120000
--- a/weinre.server/node_modules/.bin/nopt
+++ b/weinre.server/node_modules/.bin/nopt
@@ -1 +1 @@
-../nopt/bin/nopt.js
\ No newline at end of file
+/Users/pmuellr/Projects/incubator-cordova-weinre/weinre.server/node_modules/nopt/bin/nopt.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/CNAME
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/CNAME b/weinre.server/node_modules/coffee-script/CNAME
new file mode 100644
index 0000000..faadabe
--- /dev/null
+++ b/weinre.server/node_modules/coffee-script/CNAME
@@ -0,0 +1 @@
+coffeescript.org
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/LICENSE
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/LICENSE b/weinre.server/node_modules/coffee-script/LICENSE
index 8cb3cfd..dbe6b4e 100644
--- a/weinre.server/node_modules/coffee-script/LICENSE
+++ b/weinre.server/node_modules/coffee-script/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011 Jeremy Ashkenas
+Copyright (c) 2009-2012 Jeremy Ashkenas
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/browser.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/browser.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/browser.js
index ec2e479..825cbf3 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/browser.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/browser.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var CoffeeScript, runScripts;
 
@@ -5,23 +6,36 @@
 
   CoffeeScript.require = require;
 
-  CoffeeScript.eval = function(code, options) {
+  CoffeeScript["eval"] = function(code, options) {
+    var _ref;
+    if (options == null) {
+      options = {};
+    }
+    if ((_ref = options.bare) == null) {
+      options.bare = true;
+    }
     return eval(CoffeeScript.compile(code, options));
   };
 
   CoffeeScript.run = function(code, options) {
-    if (options == null) options = {};
+    if (options == null) {
+      options = {};
+    }
     options.bare = true;
     return Function(CoffeeScript.compile(code, options))();
   };
 
-  if (typeof window === "undefined" || window === null) return;
+  if (typeof window === "undefined" || window === null) {
+    return;
+  }
 
   CoffeeScript.load = function(url, callback) {
     var xhr;
     xhr = new (window.ActiveXObject || XMLHttpRequest)('Microsoft.XMLHTTP');
     xhr.open('GET', url, true);
-    if ('overrideMimeType' in xhr) xhr.overrideMimeType('text/plain');
+    if ('overrideMimeType' in xhr) {
+      xhr.overrideMimeType('text/plain');
+    }
     xhr.onreadystatechange = function() {
       var _ref;
       if (xhr.readyState === 4) {
@@ -30,7 +44,9 @@
         } else {
           throw new Error("Could not load " + url);
         }
-        if (callback) return callback();
+        if (callback) {
+          return callback();
+        }
       }
     };
     return xhr.send(null);
@@ -44,7 +60,9 @@
       _results = [];
       for (_i = 0, _len = scripts.length; _i < _len; _i++) {
         s = scripts[_i];
-        if (s.type === 'text/coffeescript') _results.push(s);
+        if (s.type === 'text/coffeescript') {
+          _results.push(s);
+        }
       }
       return _results;
     })();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/cake.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/cake.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/cake.js
index 986d5cc..1523418 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/cake.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/cake.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var CoffeeScript, cakefileDirectory, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks;
 
@@ -35,7 +36,9 @@
       return switches.push([letter, flag, description]);
     },
     invoke: function(name) {
-      if (!tasks[name]) missingTask(name);
+      if (!tasks[name]) {
+        missingTask(name);
+      }
       return tasks[name].action(options);
     }
   });
@@ -49,13 +52,15 @@
       filename: 'Cakefile'
     });
     oparse = new optparse.OptionParser(switches);
-    if (!args.length) return printTasks();
+    if (!args.length) {
+      return printTasks();
+    }
     try {
       options = oparse.parse(args);
     } catch (e) {
       return fatalError("" + e);
     }
-    _ref = options.arguments;
+    _ref = options["arguments"];
     _results = [];
     for (_i = 0, _len = _ref.length; _i < _len; _i++) {
       arg = _ref[_i];
@@ -65,8 +70,9 @@
   };
 
   printTasks = function() {
-    var cakefilePath, desc, name, spaces, task;
-    cakefilePath = path.join(path.relative(__originalDirname, process.cwd()), 'Cakefile');
+    var cakefilePath, desc, name, relative, spaces, task;
+    relative = path.relative || path.resolve;
+    cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile');
     console.log("" + cakefilePath + " defines the following tasks:\n");
     for (name in tasks) {
       task = tasks[name];
@@ -75,7 +81,9 @@
       desc = task.description ? "# " + task.description : '';
       console.log("cake " + name + spaces + " " + desc);
     }
-    if (switches.length) return console.log(oparse.help());
+    if (switches.length) {
+      return console.log(oparse.help());
+    }
   };
 
   fatalError = function(message) {
@@ -90,9 +98,13 @@
 
   cakefileDirectory = function(dir) {
     var parent;
-    if (path.existsSync(path.join(dir, 'Cakefile'))) return dir;
+    if (path.existsSync(path.join(dir, 'Cakefile'))) {
+      return dir;
+    }
     parent = path.normalize(path.join(dir, '..'));
-    if (parent !== dir) return cakefileDirectory(parent);
+    if (parent !== dir) {
+      return cakefileDirectory(parent);
+    }
     throw new Error("Cakefile not found in " + (process.cwd()));
   };
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/coffee-script.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/coffee-script.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/coffee-script.js
index fd410ba..c43fa49 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/coffee-script.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/coffee-script.js
@@ -1,6 +1,7 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var Lexer, RESERVED, compile, fs, lexer, parser, path, vm, _ref,
-    __hasProp = Object.prototype.hasOwnProperty;
+    __hasProp = {}.hasOwnProperty;
 
   fs = require('fs');
 
@@ -26,24 +27,31 @@
     });
   }
 
-  exports.VERSION = '1.2.0';
+  exports.VERSION = '1.3.3';
 
   exports.RESERVED = RESERVED;
 
   exports.helpers = require('./helpers');
 
   exports.compile = compile = function(code, options) {
-    var merge;
-    if (options == null) options = {};
+    var header, js, merge;
+    if (options == null) {
+      options = {};
+    }
     merge = exports.helpers.merge;
     try {
-      return (parser.parse(lexer.tokenize(code))).compile(merge({}, options));
+      js = (parser.parse(lexer.tokenize(code))).compile(options);
+      if (!options.header) {
+        return js;
+      }
     } catch (err) {
       if (options.filename) {
         err.message = "In " + options.filename + ", " + err.message;
       }
       throw err;
     }
+    header = "Generated by CoffeeScript " + this.VERSION;
+    return "// " + header + "\n" + js;
   };
 
   exports.tokens = function(code, options) {
@@ -60,10 +68,13 @@
 
   exports.run = function(code, options) {
     var mainModule;
+    if (options == null) {
+      options = {};
+    }
     mainModule = require.main;
     mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.';
     mainModule.moduleCache && (mainModule.moduleCache = {});
-    mainModule.paths = require('module')._nodeModulePaths(path.dirname(options.filename));
+    mainModule.paths = require('module')._nodeModulePaths(path.dirname(fs.realpathSync(options.filename)));
     if (path.extname(mainModule.filename) !== '.coffee' || require.extensions) {
       return mainModule._compile(compile(code, options), mainModule.filename);
     } else {
@@ -71,10 +82,14 @@
     }
   };
 
-  exports.eval = function(code, options) {
-    var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref2, _ref3, _require;
-    if (options == null) options = {};
-    if (!(code = code.trim())) return;
+  exports["eval"] = function(code, options) {
+    var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref1, _ref2, _require;
+    if (options == null) {
+      options = {};
+    }
+    if (!(code = code.trim())) {
+      return;
+    }
     Script = vm.Script;
     if (Script) {
       if (options.sandbox != null) {
@@ -82,10 +97,10 @@
           sandbox = options.sandbox;
         } else {
           sandbox = Script.createContext();
-          _ref2 = options.sandbox;
-          for (k in _ref2) {
-            if (!__hasProp.call(_ref2, k)) continue;
-            v = _ref2[k];
+          _ref1 = options.sandbox;
+          for (k in _ref1) {
+            if (!__hasProp.call(_ref1, k)) continue;
+            v = _ref1[k];
             sandbox[k] = v;
           }
         }
@@ -102,10 +117,12 @@
           return Module._load(path, _module, true);
         };
         _module.filename = sandbox.__filename;
-        _ref3 = Object.getOwnPropertyNames(require);
-        for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
-          r = _ref3[_i];
-          if (r !== 'paths') _require[r] = require[r];
+        _ref2 = Object.getOwnPropertyNames(require);
+        for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+          r = _ref2[_i];
+          if (r !== 'paths') {
+            _require[r] = require[r];
+          }
         }
         _require.paths = _module.paths = Module._nodeModulePaths(process.cwd());
         _require.resolve = function(request) {
@@ -132,8 +149,8 @@
 
   parser.lexer = {
     lex: function() {
-      var tag, _ref2;
-      _ref2 = this.tokens[this.pos++] || [''], tag = _ref2[0], this.yytext = _ref2[1], this.yylineno = _ref2[2];
+      var tag, _ref1;
+      _ref1 = this.tokens[this.pos++] || [''], tag = _ref1[0], this.yytext = _ref1[1], this.yylineno = _ref1[2];
       return tag;
     },
     setInput: function(tokens) {

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/command.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/command.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/command.js
index da330b3..e02da9f 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/command.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/command.js
@@ -1,5 +1,6 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
-  var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, forkNode, fs, helpers, joinTimeout, lint, loadRequires, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, version, wait, watch, watchDir, watchers, writeJs, _ref;
+  var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, forkNode, fs, helpers, hidden, joinTimeout, lint, loadRequires, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, version, wait, watch, watchDir, watchers, writeJs, _ref;
 
   fs = require('fs');
 
@@ -25,7 +26,11 @@
     return process.stderr.write(line + '\n');
   };
 
-  BANNER = 'Usage: coffee [options] path/to/script.coffee\n\nIf called without options, `coffee` will run your script.';
+  hidden = function(file) {
+    return /^\.|~$/.test(file);
+  };
+
+  BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.';
 
   SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-r', '--require [FILE*]', 'require a library before executing your script'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'dis
 play the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];
 
@@ -42,21 +47,37 @@
   optionParser = null;
 
   exports.run = function() {
-    var source, _i, _len, _results;
+    var literals, source, _i, _len, _results;
     parseOptions();
-    if (opts.nodejs) return forkNode();
-    if (opts.help) return usage();
-    if (opts.version) return version();
-    if (opts.require) loadRequires();
-    if (opts.interactive) return require('./repl');
+    if (opts.nodejs) {
+      return forkNode();
+    }
+    if (opts.help) {
+      return usage();
+    }
+    if (opts.version) {
+      return version();
+    }
+    if (opts.require) {
+      loadRequires();
+    }
+    if (opts.interactive) {
+      return require('./repl');
+    }
     if (opts.watch && !fs.watch) {
-      printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + ".");
+      return printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + ".");
+    }
+    if (opts.stdio) {
+      return compileStdio();
     }
-    if (opts.stdio) return compileStdio();
-    if (opts.eval) return compileScript(null, sources[0]);
-    if (!sources.length) return require('./repl');
-    if (opts.run) opts.literals = sources.splice(1).concat(opts.literals);
-    process.argv = process.argv.slice(0, 2).concat(opts.literals);
+    if (opts["eval"]) {
+      return compileScript(null, sources[0]);
+    }
+    if (!sources.length) {
+      return require('./repl');
+    }
+    literals = opts.run ? sources.splice(1) : [];
+    process.argv = process.argv.slice(0, 2).concat(literals);
     process.argv[0] = 'coffee';
     process.execPath = require.main.filename;
     _results = [];
@@ -69,7 +90,9 @@
 
   compilePath = function(source, topLevel, base) {
     return fs.stat(source, function(err, stats) {
-      if (err && err.code !== 'ENOENT') throw err;
+      if (err && err.code !== 'ENOENT') {
+        throw err;
+      }
       if ((err != null ? err.code : void 0) === 'ENOENT') {
         if (topLevel && source.slice(-7) !== '.coffee') {
           source = sources[sources.indexOf(source)] = "" + source + ".coffee";
@@ -82,31 +105,48 @@
         return;
       }
       if (stats.isDirectory()) {
-        if (opts.watch) watchDir(source, base);
+        if (opts.watch) {
+          watchDir(source, base);
+        }
         return fs.readdir(source, function(err, files) {
-          var file, index, _i, _len, _ref2, _results;
-          if (err && err.code !== 'ENOENT') throw err;
-          if ((err != null ? err.code : void 0) === 'ENOENT') return;
-          files = files.map(function(file) {
-            return path.join(source, file);
-          });
+          var file, index, _ref1, _ref2;
+          if (err && err.code !== 'ENOENT') {
+            throw err;
+          }
+          if ((err != null ? err.code : void 0) === 'ENOENT') {
+            return;
+          }
           index = sources.indexOf(source);
-          [].splice.apply(sources, [index, index - index + 1].concat(files)), files;
+          files = files.filter(function(file) {
+            return !hidden(file);
+          });
+          [].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() {
+            var _i, _len, _results;
+            _results = [];
+            for (_i = 0, _len = files.length; _i < _len; _i++) {
+              file = files[_i];
+              _results.push(path.join(source, file));
+            }
+            return _results;
+          })())), _ref1;
           [].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() {
             return null;
           }))), _ref2;
-          _results = [];
-          for (_i = 0, _len = files.length; _i < _len; _i++) {
-            file = files[_i];
-            _results.push(compilePath(file, false, base));
-          }
-          return _results;
+          return files.forEach(function(file) {
+            return compilePath(path.join(source, file), false, base);
+          });
         });
       } else if (topLevel || path.extname(source) === '.coffee') {
-        if (opts.watch) watch(source, base);
+        if (opts.watch) {
+          watch(source, base);
+        }
         return fs.readFile(source, function(err, code) {
-          if (err && err.code !== 'ENOENT') throw err;
-          if ((err != null ? err.code : void 0) === 'ENOENT') return;
+          if (err && err.code !== 'ENOENT') {
+            throw err;
+          }
+          if ((err != null ? err.code : void 0) === 'ENOENT') {
+            return;
+          }
           return compileScript(source, code.toString(), base);
         });
       } else {
@@ -149,8 +189,12 @@
       }
     } catch (err) {
       CoffeeScript.emit('failure', err, task);
-      if (CoffeeScript.listeners('failure').length) return;
-      if (o.watch) return printLine(err.message);
+      if (CoffeeScript.listeners('failure').length) {
+        return;
+      }
+      if (o.watch) {
+        return printLine(err.message + '\x07');
+      }
       printWarn(err instanceof Error && err.stack || ("ERROR: " + err));
       return process.exit(1);
     }
@@ -161,7 +205,9 @@
     code = '';
     stdin = process.openStdin();
     stdin.on('data', function(buffer) {
-      if (buffer) return code += buffer.toString();
+      if (buffer) {
+        return code += buffer.toString();
+      }
     });
     return stdin.on('end', function() {
       return compileScript(null, code);
@@ -171,7 +217,9 @@
   joinTimeout = null;
 
   compileJoin = function() {
-    if (!opts.join) return;
+    if (!opts.join) {
+      return;
+    }
     if (!sourceCode.some(function(code) {
       return code === null;
     })) {
@@ -183,26 +231,33 @@
   };
 
   loadRequires = function() {
-    var realFilename, req, _i, _len, _ref2;
+    var realFilename, req, _i, _len, _ref1;
     realFilename = module.filename;
     module.filename = '.';
-    _ref2 = opts.require;
-    for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
-      req = _ref2[_i];
+    _ref1 = opts.require;
+    for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+      req = _ref1[_i];
       require(req);
     }
     return module.filename = realFilename;
   };
 
   watch = function(source, base) {
-    var callback, compile, compileTimeout, prevStats, watchErr, watcher;
+    var compile, compileTimeout, prevStats, rewatch, watchErr, watcher;
     prevStats = null;
     compileTimeout = null;
     watchErr = function(e) {
       if (e.code === 'ENOENT') {
-        if (sources.indexOf(source) === -1) return;
-        removeSource(source, base, true);
-        return compileJoin();
+        if (sources.indexOf(source) === -1) {
+          return;
+        }
+        try {
+          rewatch();
+          return compile();
+        } catch (e) {
+          removeSource(source, base, true);
+          return compileJoin();
+        }
       } else {
         throw e;
       }
@@ -211,42 +266,34 @@
       clearTimeout(compileTimeout);
       return compileTimeout = wait(25, function() {
         return fs.stat(source, function(err, stats) {
-          if (err) return watchErr(err);
-          if (prevStats && (stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime())) {
-            return;
+          if (err) {
+            return watchErr(err);
+          }
+          if (prevStats && stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime()) {
+            return rewatch();
           }
           prevStats = stats;
           return fs.readFile(source, function(err, code) {
-            if (err) return watchErr(err);
-            return compileScript(source, code.toString(), base);
+            if (err) {
+              return watchErr(err);
+            }
+            compileScript(source, code.toString(), base);
+            return rewatch();
           });
         });
       });
     };
-    watchErr = function(e) {
-      if (e.code !== 'ENOENT') throw e;
-      removeSource(source, base, true);
-      return compileJoin();
-    };
     try {
-      return watcher = fs.watch(source, callback = function(event) {
-        if (event === 'change') {
-          return compile();
-        } else if (event === 'rename') {
-          watcher.close();
-          return wait(250, function() {
-            compile();
-            try {
-              return watcher = fs.watch(source, callback);
-            } catch (e) {
-              return watchErr(e);
-            }
-          });
-        }
-      });
+      watcher = fs.watch(source, compile);
     } catch (e) {
-      return watchErr(e);
+      watchErr(e);
     }
+    return rewatch = function() {
+      if (watcher != null) {
+        watcher.close();
+      }
+      return watcher = fs.watch(source, compile);
+    };
   };
 
   watchDir = function(source, base) {
@@ -259,17 +306,19 @@
           return fs.readdir(source, function(err, files) {
             var file, _i, _len, _results;
             if (err) {
-              if (err.code !== 'ENOENT') throw err;
+              if (err.code !== 'ENOENT') {
+                throw err;
+              }
               watcher.close();
               return unwatchDir(source, base);
             }
-            files = files.map(function(file) {
-              return path.join(source, file);
-            });
             _results = [];
             for (_i = 0, _len = files.length; _i < _len; _i++) {
               file = files[_i];
-              if (!(!notSources[file])) continue;
+              if (!(!hidden(file) && !notSources[file])) {
+                continue;
+              }
+              file = path.join(source, file);
               if (sources.some(function(s) {
                 return s.indexOf(file) >= 0;
               })) {
@@ -284,19 +333,23 @@
         });
       });
     } catch (e) {
-      if (e.code !== 'ENOENT') throw e;
+      if (e.code !== 'ENOENT') {
+        throw e;
+      }
     }
   };
 
   unwatchDir = function(source, base) {
     var file, prevSources, toRemove, _i, _len;
-    prevSources = sources.slice();
+    prevSources = sources.slice(0);
     toRemove = (function() {
       var _i, _len, _results;
       _results = [];
       for (_i = 0, _len = sources.length; _i < _len; _i++) {
         file = sources[_i];
-        if (file.indexOf(source) >= 0) _results.push(file);
+        if (file.indexOf(source) >= 0) {
+          _results.push(file);
+        }
       }
       return _results;
     })();
@@ -322,7 +375,9 @@
       return path.exists(jsPath, function(exists) {
         if (exists) {
           return fs.unlink(jsPath, function(err) {
-            if (err && err.code !== 'ENOENT') throw err;
+            if (err && err.code !== 'ENOENT') {
+              throw err;
+            }
             return timeLog("removed " + source);
           });
         }
@@ -344,7 +399,9 @@
     jsPath = outputPath(source, base);
     jsDir = path.dirname(jsPath);
     compile = function() {
-      if (js.length <= 0) js = ' ';
+      if (js.length <= 0) {
+        js = ' ';
+      }
       return fs.writeFile(jsPath, js, function(err) {
         if (err) {
           return printLine(err.message);
@@ -386,11 +443,11 @@
   printTokens = function(tokens) {
     var strings, tag, token, value;
     strings = (function() {
-      var _i, _len, _ref2, _results;
+      var _i, _len, _ref1, _results;
       _results = [];
       for (_i = 0, _len = tokens.length; _i < _len; _i++) {
         token = tokens[_i];
-        _ref2 = [token[0], token[1].toString().replace(/\n/, '\\n')], tag = _ref2[0], value = _ref2[1];
+        _ref1 = [token[0], token[1].toString().replace(/\n/, '\\n')], tag = _ref1[0], value = _ref1[1];
         _results.push("[" + tag + " " + value + "]");
       }
       return _results;
@@ -399,14 +456,14 @@
   };
 
   parseOptions = function() {
-    var i, o, source, _len;
+    var i, o, source, _i, _len;
     optionParser = new optparse.OptionParser(SWITCHES, BANNER);
     o = opts = optionParser.parse(process.argv.slice(2));
     o.compile || (o.compile = !!o.output);
     o.run = !(o.compile || o.print || o.lint);
-    o.print = !!(o.print || (o.eval || o.stdio && o.compile));
-    sources = o.arguments;
-    for (i = 0, _len = sources.length; i < _len; i++) {
+    o.print = !!(o.print || (o["eval"] || o.stdio && o.compile));
+    sources = o["arguments"];
+    for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) {
       source = sources[i];
       sourceCode[i] = null;
     }
@@ -415,7 +472,8 @@
   compileOptions = function(filename) {
     return {
       filename: filename,
-      bare: opts.bare
+      bare: opts.bare,
+      header: opts.compile
     };
   };
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/grammar.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/grammar.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/grammar.js
index 2424fc7..5662138 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/grammar.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/grammar.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap;
 
@@ -8,7 +9,9 @@
   o = function(patternString, action, options) {
     var match;
     patternString = patternString.replace(/\s{2,}/g, ' ');
-    if (!action) return [patternString, '$$ = $1;', options];
+    if (!action) {
+      return [patternString, '$$ = $1;', options];
+    }
     action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())";
     action = action.replace(/\bnew /g, '$&yy.');
     action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&');
@@ -61,11 +64,12 @@
         return new Literal($1);
       }), o('DEBUGGER', function() {
         return new Literal($1);
+      }), o('UNDEFINED', function() {
+        return new Undefined;
+      }), o('NULL', function() {
+        return new Null;
       }), o('BOOL', function() {
-        var val;
-        val = new Literal($1);
-        if ($1 === 'undefined') val.isUndefined = true;
-        return val;
+        return new Bool($1);
       })
     ],
     Assign: [
@@ -122,6 +126,10 @@
         return [$1];
       }), o('ParamList , Param', function() {
         return $1.concat($3);
+      }), o('ParamList OptComma TERMINATOR Param', function() {
+        return $1.concat($4);
+      }), o('ParamList OptComma INDENT ParamList OptComma OUTDENT', function() {
+        return $1.concat($4);
       })
     ],
     Param: [
@@ -291,6 +299,8 @@
         return new Range($1, null, $2);
       }), o('RangeDots Expression', function() {
         return new Range(null, $2, $1);
+      }), o('RangeDots', function() {
+        return new Range(null, null, $1);
       })
     ],
     ArgList: [
@@ -406,7 +416,7 @@
       })
     ],
     ForValue: [
-      o('Identifier'), o('Array', function() {
+      o('Identifier'), o('ThisProperty'), o('Array', function() {
         return new Value($1);
       }), o('Object', function() {
         return new Value($1);
@@ -559,23 +569,27 @@
     ]
   };
 
-  operators = [['left', '.', '?.', '::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', 'LOGIC'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'DO', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'], ['right', 'POST_IF']];
+  operators = [['left', '.', '?.', '::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', 'LOGIC'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'], ['right', 'POST_IF']];
 
   tokens = [];
 
   for (name in grammar) {
     alternatives = grammar[name];
     grammar[name] = (function() {
-      var _i, _j, _len, _len2, _ref, _results;
+      var _i, _j, _len, _len1, _ref, _results;
       _results = [];
       for (_i = 0, _len = alternatives.length; _i < _len; _i++) {
         alt = alternatives[_i];
         _ref = alt[0].split(' ');
-        for (_j = 0, _len2 = _ref.length; _j < _len2; _j++) {
+        for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
           token = _ref[_j];
-          if (!grammar[token]) tokens.push(token);
+          if (!grammar[token]) {
+            tokens.push(token);
+          }
+        }
+        if (name === 'Root') {
+          alt[1] = "return " + alt[1];
         }
-        if (name === 'Root') alt[1] = "return " + alt[1];
         _results.push(alt);
       }
       return _results;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/helpers.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/helpers.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/helpers.js
index 038f781..b0a997b 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/helpers.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/helpers.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var extend, flatten;
 
@@ -16,7 +17,9 @@
     _results = [];
     for (_i = 0, _len = array.length; _i < _len; _i++) {
       item = array[_i];
-      if (item) _results.push(item);
+      if (item) {
+        _results.push(item);
+      }
     }
     return _results;
   };
@@ -24,7 +27,9 @@
   exports.count = function(string, substr) {
     var num, pos;
     num = pos = 0;
-    if (!substr.length) return 1 / 0;
+    if (!substr.length) {
+      return 1 / 0;
+    }
     while (pos = 1 + string.indexOf(substr, pos)) {
       num++;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/index.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/index.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/index.js
index 5e6eba9..d344c41 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/index.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/index.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var key, val, _ref;
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/lexer.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/lexer.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/lexer.js
index 1dd3b04..f80a443 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/lexer.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/lexer.js
@@ -1,10 +1,11 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
-  var BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, starts, _ref, _ref2,
-    __indexOf = Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+  var BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, starts, _ref, _ref1,
+    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
 
   _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES;
 
-  _ref2 = require('./helpers'), count = _ref2.count, starts = _ref2.starts, compact = _ref2.compact, last = _ref2.last;
+  _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last;
 
   exports.Lexer = Lexer = (function() {
 
@@ -12,8 +13,12 @@
 
     Lexer.prototype.tokenize = function(code, opts) {
       var i, tag;
-      if (opts == null) opts = {};
-      if (WHITESPACE.test(code)) code = "\n" + code;
+      if (opts == null) {
+        opts = {};
+      }
+      if (WHITESPACE.test(code)) {
+        code = "\n" + code;
+      }
       code = code.replace(/\r/g, '').replace(TRAILING_SPACES, '');
       this.code = code;
       this.line = opts.line || 0;
@@ -28,24 +33,30 @@
         i += this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken();
       }
       this.closeIndentation();
-      if (tag = this.ends.pop()) this.error("missing " + tag);
-      if (opts.rewrite === false) return this.tokens;
+      if (tag = this.ends.pop()) {
+        this.error("missing " + tag);
+      }
+      if (opts.rewrite === false) {
+        return this.tokens;
+      }
       return (new Rewriter).rewrite(this.tokens);
     };
 
     Lexer.prototype.identifierToken = function() {
-      var colon, forcedIdentifier, id, input, match, prev, tag, _ref3, _ref4;
-      if (!(match = IDENTIFIER.exec(this.chunk))) return 0;
+      var colon, forcedIdentifier, id, input, match, prev, tag, _ref2, _ref3;
+      if (!(match = IDENTIFIER.exec(this.chunk))) {
+        return 0;
+      }
       input = match[0], id = match[1], colon = match[2];
       if (id === 'own' && this.tag() === 'FOR') {
         this.token('OWN', id);
         return id.length;
       }
-      forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref3 = prev[0]) === '.' || _ref3 === '?.' || _ref3 === '::') || !prev.spaced && prev[0] === '@');
+      forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::') || !prev.spaced && prev[0] === '@');
       tag = 'IDENTIFIER';
       if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) {
         tag = id.toUpperCase();
-        if (tag === 'WHEN' && (_ref4 = this.tag(), __indexOf.call(LINE_BREAK, _ref4) >= 0)) {
+        if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) {
           tag = 'LEADING_WHEN';
         } else if (tag === 'FOR') {
           this.seenFor = true;
@@ -66,7 +77,7 @@
           }
         }
       }
-      if (__indexOf.call(['eval', 'arguments'].concat(JS_FORBIDDEN), id) >= 0) {
+      if (__indexOf.call(JS_FORBIDDEN, id) >= 0) {
         if (forcedIdentifier) {
           tag = 'IDENTIFIER';
           id = new String(id);
@@ -76,7 +87,9 @@
         }
       }
       if (!forcedIdentifier) {
-        if (__indexOf.call(COFFEE_ALIASES, id) >= 0) id = COFFEE_ALIAS_MAP[id];
+        if (__indexOf.call(COFFEE_ALIASES, id) >= 0) {
+          id = COFFEE_ALIAS_MAP[id];
+        }
         tag = (function() {
           switch (id) {
             case '!':
@@ -89,8 +102,6 @@
               return 'LOGIC';
             case 'true':
             case 'false':
-            case 'null':
-            case 'undefined':
               return 'BOOL';
             case 'break':
             case 'continue':
@@ -101,31 +112,51 @@
         })();
       }
       this.token(tag, id);
-      if (colon) this.token(':', ':');
+      if (colon) {
+        this.token(':', ':');
+      }
       return input.length;
     };
 
     Lexer.prototype.numberToken = function() {
-      var binaryLiteral, lexedLength, match, number;
-      if (!(match = NUMBER.exec(this.chunk))) return 0;
+      var binaryLiteral, lexedLength, match, number, octalLiteral;
+      if (!(match = NUMBER.exec(this.chunk))) {
+        return 0;
+      }
       number = match[0];
+      if (/^0[BOX]/.test(number)) {
+        this.error("radix prefix '" + number + "' must be lowercase");
+      } else if (/E/.test(number) && !/^0x/.test(number)) {
+        this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
+      } else if (/^0\d*[89]/.test(number)) {
+        this.error("decimal literal '" + number + "' must not be prefixed with '0'");
+      } else if (/^0\d+/.test(number)) {
+        this.error("octal literal '" + number + "' must be prefixed with '0o'");
+      }
       lexedLength = number.length;
-      if (binaryLiteral = /0b([01]+)/.exec(number)) {
-        number = (parseInt(binaryLiteral[1], 2)).toString();
+      if (octalLiteral = /^0o([0-7]+)/.exec(number)) {
+        number = '0x' + (parseInt(octalLiteral[1], 8)).toString(16);
+      }
+      if (binaryLiteral = /^0b([01]+)/.exec(number)) {
+        number = '0x' + (parseInt(binaryLiteral[1], 2)).toString(16);
       }
       this.token('NUMBER', number);
       return lexedLength;
     };
 
     Lexer.prototype.stringToken = function() {
-      var match, string;
+      var match, octalEsc, string;
       switch (this.chunk.charAt(0)) {
         case "'":
-          if (!(match = SIMPLESTR.exec(this.chunk))) return 0;
+          if (!(match = SIMPLESTR.exec(this.chunk))) {
+            return 0;
+          }
           this.token('STRING', (string = match[0]).replace(MULTILINER, '\\\n'));
           break;
         case '"':
-          if (!(string = this.balancedString(this.chunk, '"'))) return 0;
+          if (!(string = this.balancedString(this.chunk, '"'))) {
+            return 0;
+          }
           if (0 < string.indexOf('#{', 1)) {
             this.interpolateString(string.slice(1, -1));
           } else {
@@ -135,13 +166,18 @@
         default:
           return 0;
       }
+      if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) {
+        this.error("octal escape sequences " + string + " are not allowed");
+      }
       this.line += count(string, '\n');
       return string.length;
     };
 
     Lexer.prototype.heredocToken = function() {
       var doc, heredoc, match, quote;
-      if (!(match = HEREDOC.exec(this.chunk))) return 0;
+      if (!(match = HEREDOC.exec(this.chunk))) {
+        return 0;
+      }
       heredoc = match[0];
       quote = heredoc.charAt(0);
       doc = this.sanitizeHeredoc(match[2], {
@@ -161,14 +197,15 @@
 
     Lexer.prototype.commentToken = function() {
       var comment, here, match;
-      if (!(match = this.chunk.match(COMMENT))) return 0;
+      if (!(match = this.chunk.match(COMMENT))) {
+        return 0;
+      }
       comment = match[0], here = match[1];
       if (here) {
         this.token('HERECOMMENT', this.sanitizeHeredoc(here, {
           herecomment: true,
           indent: Array(this.indent + 1).join(' ')
         }));
-        this.token('TERMINATOR', '\n');
       }
       this.line += count(comment, '\n');
       return comment.length;
@@ -184,29 +221,35 @@
     };
 
     Lexer.prototype.regexToken = function() {
-      var flags, length, match, prev, regex, _ref3, _ref4;
-      if (this.chunk.charAt(0) !== '/') return 0;
+      var flags, length, match, prev, regex, _ref2, _ref3;
+      if (this.chunk.charAt(0) !== '/') {
+        return 0;
+      }
       if (match = HEREGEX.exec(this.chunk)) {
         length = this.heregexToken(match);
         this.line += count(match[0], '\n');
         return length;
       }
       prev = last(this.tokens);
-      if (prev && (_ref3 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref3) >= 0)) {
+      if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
         return 0;
       }
-      if (!(match = REGEX.exec(this.chunk))) return 0;
-      _ref4 = match, match = _ref4[0], regex = _ref4[1], flags = _ref4[2];
+      if (!(match = REGEX.exec(this.chunk))) {
+        return 0;
+      }
+      _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2];
       if (regex.slice(0, 2) === '/*') {
         this.error('regular expressions cannot begin with `*`');
       }
-      if (regex === '//') regex = '/(?:)/';
+      if (regex === '//') {
+        regex = '/(?:)/';
+      }
       this.token('REGEX', "" + regex + flags);
       return match.length;
     };
 
     Lexer.prototype.heregexToken = function(match) {
-      var body, flags, heregex, re, tag, tokens, value, _i, _len, _ref3, _ref4, _ref5, _ref6;
+      var body, flags, heregex, re, tag, tokens, value, _i, _len, _ref2, _ref3, _ref4, _ref5;
       heregex = match[0], body = match[1], flags = match[2];
       if (0 > body.indexOf('#{')) {
         re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/');
@@ -219,33 +262,39 @@
       this.token('IDENTIFIER', 'RegExp');
       this.tokens.push(['CALL_START', '(']);
       tokens = [];
-      _ref3 = this.interpolateString(body, {
+      _ref2 = this.interpolateString(body, {
         regex: true
       });
-      for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
-        _ref4 = _ref3[_i], tag = _ref4[0], value = _ref4[1];
+      for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+        _ref3 = _ref2[_i], tag = _ref3[0], value = _ref3[1];
         if (tag === 'TOKENS') {
           tokens.push.apply(tokens, value);
         } else {
-          if (!(value = value.replace(HEREGEX_OMIT, ''))) continue;
+          if (!(value = value.replace(HEREGEX_OMIT, ''))) {
+            continue;
+          }
           value = value.replace(/\\/g, '\\\\');
           tokens.push(['STRING', this.makeString(value, '"', true)]);
         }
         tokens.push(['+', '+']);
       }
       tokens.pop();
-      if (((_ref5 = tokens[0]) != null ? _ref5[0] : void 0) !== 'STRING') {
+      if (((_ref4 = tokens[0]) != null ? _ref4[0] : void 0) !== 'STRING') {
         this.tokens.push(['STRING', '""'], ['+', '+']);
       }
-      (_ref6 = this.tokens).push.apply(_ref6, tokens);
-      if (flags) this.tokens.push([',', ','], ['STRING', '"' + flags + '"']);
+      (_ref5 = this.tokens).push.apply(_ref5, tokens);
+      if (flags) {
+        this.tokens.push([',', ','], ['STRING', '"' + flags + '"']);
+      }
       this.token(')', ')');
       return heregex.length;
     };
 
     Lexer.prototype.lineToken = function() {
       var diff, indent, match, noNewlines, prev, size;
-      if (!(match = MULTI_DENT.exec(this.chunk))) return 0;
+      if (!(match = MULTI_DENT.exec(this.chunk))) {
+        return 0;
+      }
       indent = match[0];
       this.line += count(indent, '\n');
       this.seenFor = false;
@@ -299,7 +348,9 @@
           this.token('OUTDENT', dent);
         }
       }
-      if (dent) this.outdebt -= moveOut;
+      if (dent) {
+        this.outdebt -= moveOut;
+      }
       while (this.value() === ';') {
         this.tokens.pop();
       }
@@ -315,7 +366,9 @@
         return 0;
       }
       prev = last(this.tokens);
-      if (prev) prev[match ? 'spaced' : 'newLine'] = true;
+      if (prev) {
+        prev[match ? 'spaced' : 'newLine'] = true;
+      }
       if (match) {
         return match[0].length;
       } else {
@@ -327,30 +380,36 @@
       while (this.value() === ';') {
         this.tokens.pop();
       }
-      if (this.tag() !== 'TERMINATOR') this.token('TERMINATOR', '\n');
+      if (this.tag() !== 'TERMINATOR') {
+        this.token('TERMINATOR', '\n');
+      }
       return this;
     };
 
     Lexer.prototype.suppressNewlines = function() {
-      if (this.value() === '\\') this.tokens.pop();
+      if (this.value() === '\\') {
+        this.tokens.pop();
+      }
       return this;
     };
 
     Lexer.prototype.literalToken = function() {
-      var match, prev, tag, value, _ref3, _ref4, _ref5, _ref6;
+      var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5;
       if (match = OPERATOR.exec(this.chunk)) {
         value = match[0];
-        if (CODE.test(value)) this.tagParameters();
+        if (CODE.test(value)) {
+          this.tagParameters();
+        }
       } else {
         value = this.chunk.charAt(0);
       }
       tag = value;
       prev = last(this.tokens);
       if (value === '=' && prev) {
-        if (!prev[1].reserved && (_ref3 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref3) >= 0)) {
+        if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) {
           this.error("reserved word \"" + (this.value()) + "\" can't be assigned");
         }
-        if ((_ref4 = prev[1]) === '||' || _ref4 === '&&') {
+        if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') {
           prev[0] = 'COMPOUND_ASSIGN';
           prev[1] += '=';
           return value.length;
@@ -372,10 +431,12 @@
       } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) {
         tag = 'LOGIC';
       } else if (prev && !prev.spaced) {
-        if (value === '(' && (_ref5 = prev[0], __indexOf.call(CALLABLE, _ref5) >= 0)) {
-          if (prev[0] === '?') prev[0] = 'FUNC_EXIST';
+        if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) {
+          if (prev[0] === '?') {
+            prev[0] = 'FUNC_EXIST';
+          }
           tag = 'CALL_START';
-        } else if (value === '[' && (_ref6 = prev[0], __indexOf.call(INDEXABLE, _ref6) >= 0)) {
+        } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) {
           tag = 'INDEX_START';
           switch (prev[0]) {
             case '?':
@@ -399,29 +460,37 @@
     };
 
     Lexer.prototype.sanitizeHeredoc = function(doc, options) {
-      var attempt, herecomment, indent, match, _ref3;
+      var attempt, herecomment, indent, match, _ref2;
       indent = options.indent, herecomment = options.herecomment;
       if (herecomment) {
         if (HEREDOC_ILLEGAL.test(doc)) {
           this.error("block comment cannot contain \"*/\", starting");
         }
-        if (doc.indexOf('\n') <= 0) return doc;
+        if (doc.indexOf('\n') <= 0) {
+          return doc;
+        }
       } else {
         while (match = HEREDOC_INDENT.exec(doc)) {
           attempt = match[1];
-          if (indent === null || (0 < (_ref3 = attempt.length) && _ref3 < indent.length)) {
+          if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) {
             indent = attempt;
           }
         }
       }
-      if (indent) doc = doc.replace(RegExp("\\n" + indent, "g"), '\n');
-      if (!herecomment) doc = doc.replace(/^\n/, '');
+      if (indent) {
+        doc = doc.replace(RegExp("\\n" + indent, "g"), '\n');
+      }
+      if (!herecomment) {
+        doc = doc.replace(/^\n/, '');
+      }
       return doc;
     };
 
     Lexer.prototype.tagParameters = function() {
       var i, stack, tok, tokens;
-      if (this.tag() !== ')') return this;
+      if (this.tag() !== ')') {
+        return this;
+      }
       stack = [];
       tokens = this.tokens;
       i = tokens.length;
@@ -451,23 +520,30 @@
     };
 
     Lexer.prototype.balancedString = function(str, end) {
-      var i, letter, match, prev, stack, _ref3;
+      var continueCount, i, letter, match, prev, stack, _i, _ref2;
+      continueCount = 0;
       stack = [end];
-      for (i = 1, _ref3 = str.length; 1 <= _ref3 ? i < _ref3 : i > _ref3; 1 <= _ref3 ? i++ : i--) {
+      for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) {
+        if (continueCount) {
+          --continueCount;
+          continue;
+        }
         switch (letter = str.charAt(i)) {
           case '\\':
-            i++;
+            ++continueCount;
             continue;
           case end:
             stack.pop();
-            if (!stack.length) return str.slice(0, i + 1);
+            if (!stack.length) {
+              return str.slice(0, i + 1 || 9e9);
+            }
             end = stack[stack.length - 1];
             continue;
         }
         if (end === '}' && (letter === '"' || letter === "'")) {
           stack.push(end = letter);
         } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) {
-          i += match[0].length - 1;
+          continueCount += match[0].length - 1;
         } else if (end === '}' && letter === '{') {
           stack.push(end = '}');
         } else if (end === '"' && prev === '#' && letter === '{') {
@@ -479,8 +555,10 @@
     };
 
     Lexer.prototype.interpolateString = function(str, options) {
-      var expr, heredoc, i, inner, interpolated, len, letter, nested, pi, regex, tag, tokens, value, _len, _ref3, _ref4, _ref5;
-      if (options == null) options = {};
+      var expr, heredoc, i, inner, interpolated, len, letter, nested, pi, regex, tag, tokens, value, _i, _len, _ref2, _ref3, _ref4;
+      if (options == null) {
+        options = {};
+      }
       heredoc = options.heredoc, regex = options.regex;
       tokens = [];
       pi = 0;
@@ -493,7 +571,9 @@
         if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) {
           continue;
         }
-        if (pi < i) tokens.push(['NEOSTRING', str.slice(pi, i)]);
+        if (pi < i) {
+          tokens.push(['NEOSTRING', str.slice(pi, i)]);
+        }
         inner = expr.slice(1, -1);
         if (inner.length) {
           nested = new Lexer().tokenize(inner, {
@@ -501,7 +581,7 @@
             rewrite: false
           });
           nested.pop();
-          if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') {
+          if (((_ref2 = nested[0]) != null ? _ref2[0] : void 0) === 'TERMINATOR') {
             nested.shift();
           }
           if (len = nested.length) {
@@ -515,28 +595,44 @@
         i += expr.length;
         pi = i + 1;
       }
-      if ((i > pi && pi < str.length)) tokens.push(['NEOSTRING', str.slice(pi)]);
-      if (regex) return tokens;
-      if (!tokens.length) return this.token('STRING', '""');
-      if (tokens[0][0] !== 'NEOSTRING') tokens.unshift(['', '']);
-      if (interpolated = tokens.length > 1) this.token('(', '(');
-      for (i = 0, _len = tokens.length; i < _len; i++) {
-        _ref4 = tokens[i], tag = _ref4[0], value = _ref4[1];
-        if (i) this.token('+', '+');
+      if ((i > pi && pi < str.length)) {
+        tokens.push(['NEOSTRING', str.slice(pi)]);
+      }
+      if (regex) {
+        return tokens;
+      }
+      if (!tokens.length) {
+        return this.token('STRING', '""');
+      }
+      if (tokens[0][0] !== 'NEOSTRING') {
+        tokens.unshift(['', '']);
+      }
+      if (interpolated = tokens.length > 1) {
+        this.token('(', '(');
+      }
+      for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) {
+        _ref3 = tokens[i], tag = _ref3[0], value = _ref3[1];
+        if (i) {
+          this.token('+', '+');
+        }
         if (tag === 'TOKENS') {
-          (_ref5 = this.tokens).push.apply(_ref5, value);
+          (_ref4 = this.tokens).push.apply(_ref4, value);
         } else {
           this.token('STRING', this.makeString(value, '"', heredoc));
         }
       }
-      if (interpolated) this.token(')', ')');
+      if (interpolated) {
+        this.token(')', ')');
+      }
       return tokens;
     };
 
     Lexer.prototype.pair = function(tag) {
       var size, wanted;
       if (tag !== (wanted = last(this.ends))) {
-        if ('OUTDENT' !== wanted) this.error("unmatched " + tag);
+        if ('OUTDENT' !== wanted) {
+          this.error("unmatched " + tag);
+        }
         this.indent -= size = last(this.indents);
         this.outdentToken(size, true);
         return this.pair(tag);
@@ -559,8 +655,8 @@
     };
 
     Lexer.prototype.unfinished = function() {
-      var _ref3;
-      return LINE_CONTINUER.test(this.chunk) || ((_ref3 = this.tag()) === '\\' || _ref3 === '.' || _ref3 === '?.' || _ref3 === 'UNARY' || _ref3 === 'MATH' || _ref3 === '+' || _ref3 === '-' || _ref3 === 'SHIFT' || _ref3 === 'RELATION' || _ref3 === 'COMPARE' || _ref3 === 'LOGIC' || _ref3 === 'COMPOUND_ASSIGN' || _ref3 === 'THROW' || _ref3 === 'EXTENDS');
+      var _ref2;
+      return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS');
     };
 
     Lexer.prototype.escapeLines = function(str, heredoc) {
@@ -568,7 +664,9 @@
     };
 
     Lexer.prototype.makeString = function(body, quote, heredoc) {
-      if (!body) return quote + quote;
+      if (!body) {
+        return quote + quote;
+      }
       body = body.replace(/\\([\s\S])/g, function(match, contents) {
         if (contents === '\n' || contents === quote) {
           return contents;
@@ -615,15 +713,19 @@
 
   COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES);
 
-  RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf'];
+  RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'let', 'package', 'private', 'protected', 'public', 'static', 'yield'];
+
+  STRICT_PROSCRIBED = ['arguments', 'eval'];
+
+  JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED);
 
-  JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED);
+  exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED);
 
-  exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS);
+  exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED;
 
   IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/;
 
-  NUMBER = /^0x[\da-f]+|^0b[01]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
+  NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
 
   HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/;
 
@@ -671,15 +773,15 @@
 
   RELATION = ['IN', 'OF', 'INSTANCEOF'];
 
-  BOOL = ['TRUE', 'FALSE', 'NULL', 'UNDEFINED'];
+  BOOL = ['TRUE', 'FALSE'];
 
-  NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', '++', '--', ']'];
+  NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--', ']'];
 
   NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING');
 
   CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER'];
 
-  INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL');
+  INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED');
 
   LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
 


Mime
View raw message