You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/06/13 19:09:08 UTC

[9/19] webworks commit: [CB-606] Added create script for unix and windows

[CB-606] Added create script for unix and windows


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/commit/5f3fbff2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/5f3fbff2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/5f3fbff2

Branch: refs/heads/master
Commit: 5f3fbff20666f11ef5bf4de71acec1860e60078a
Parents: 245c2c6
Author: Fil Maj <ma...@gmail.com>
Authored: Tue Jun 12 18:19:30 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Tue Jun 12 18:19:30 2012 -0700

----------------------------------------------------------------------
 .gitignore                                         |    3 -
 README.md                                          |   74 +-
 bin/BOOM                                           |   21 +
 bin/autotest                                       |    2 +
 bin/bench                                          |   47 +
 bin/create                                         |   77 +
 bin/create.bat                                     |   14 +
 bin/create.js                                      |   90 +
 bin/create.xml                                     |   98 +
 bin/node_modules/.bin/cake                         |    1 +
 bin/node_modules/.bin/coffee                       |    1 +
 bin/node_modules/.bin/nodeunit                     |    1 +
 bin/node_modules/coffee-script/.npmignore          |   11 +
 bin/node_modules/coffee-script/LICENSE             |   22 +
 bin/node_modules/coffee-script/README              |   48 +
 bin/node_modules/coffee-script/Rakefile            |   78 +
 bin/node_modules/coffee-script/bin/cake            |    7 +
 bin/node_modules/coffee-script/bin/coffee          |    7 +
 bin/node_modules/coffee-script/extras/jsl.conf     |   44 +
 bin/node_modules/coffee-script/lib/browser.js      |   75 +
 bin/node_modules/coffee-script/lib/cake.js         |   76 +
 .../coffee-script/lib/coffee-script.js             |  135 +
 bin/node_modules/coffee-script/lib/command.js      |  301 ++
 bin/node_modules/coffee-script/lib/grammar.js      |  591 ++++
 bin/node_modules/coffee-script/lib/helpers.js      |   66 +
 bin/node_modules/coffee-script/lib/index.js        |    8 +
 bin/node_modules/coffee-script/lib/lexer.js        |  656 +++++
 bin/node_modules/coffee-script/lib/nodes.js        | 2289 +++++++++++++++
 bin/node_modules/coffee-script/lib/optparse.js     |  111 +
 bin/node_modules/coffee-script/lib/parser.js       |  676 +++++
 bin/node_modules/coffee-script/lib/repl.js         |  123 +
 bin/node_modules/coffee-script/lib/rewriter.js     |  363 +++
 bin/node_modules/coffee-script/lib/scope.js        |  120 +
 bin/node_modules/coffee-script/package.json        |   27 +
 bin/node_modules/nodeunit/.npmignore               |    3 +
 bin/node_modules/nodeunit/CONTRIBUTORS.md          |   60 +
 bin/node_modules/nodeunit/LICENSE                  |   19 +
 bin/node_modules/nodeunit/Makefile                 |  126 +
 bin/node_modules/nodeunit/README.md                |  432 +++
 bin/node_modules/nodeunit/bin/nodeunit             |  120 +
 bin/node_modules/nodeunit/bin/nodeunit.json        |   10 +
 bin/node_modules/nodeunit/deps/async.js            |  623 ++++
 bin/node_modules/nodeunit/deps/console.log.js      |   55 +
 bin/node_modules/nodeunit/deps/ejs.js              |  125 +
 bin/node_modules/nodeunit/deps/json2.js            |  483 +++
 bin/node_modules/nodeunit/doc/nodeunit.md          |   60 +
 .../nodeunit/examples/browser/nodeunit.js          | 1757 +++++++++++
 .../nodeunit/examples/browser/suite1.js            |   12 +
 .../nodeunit/examples/browser/suite2.js            |   13 +
 .../nodeunit/examples/browser/test.html            |   16 +
 bin/node_modules/nodeunit/img/example_fail.png     |  Bin 0 -> 38642 bytes
 bin/node_modules/nodeunit/img/example_pass.png     |  Bin 0 -> 14133 bytes
 bin/node_modules/nodeunit/index.js                 |    3 +
 bin/node_modules/nodeunit/lib/assert.js            |  316 ++
 bin/node_modules/nodeunit/lib/core.js              |  260 ++
 bin/node_modules/nodeunit/lib/nodeunit.js          |   82 +
 bin/node_modules/nodeunit/lib/reporters/browser.js |  119 +
 bin/node_modules/nodeunit/lib/reporters/default.js |  123 +
 bin/node_modules/nodeunit/lib/reporters/html.js    |  107 +
 bin/node_modules/nodeunit/lib/reporters/index.js   |    9 +
 bin/node_modules/nodeunit/lib/reporters/junit.js   |  183 ++
 bin/node_modules/nodeunit/lib/reporters/minimal.js |  112 +
 .../nodeunit/lib/reporters/skip_passed.js          |  105 +
 bin/node_modules/nodeunit/lib/track.js             |   48 +
 bin/node_modules/nodeunit/lib/types.js             |  187 ++
 bin/node_modules/nodeunit/lib/utils.js             |  209 ++
 bin/node_modules/nodeunit/man1/nodeunit.1          |   95 +
 bin/node_modules/nodeunit/nodelint.cfg             |    4 +
 bin/node_modules/nodeunit/package.json             |   56 +
 bin/node_modules/nodeunit/share/junit.xml.ejs      |   19 +
 bin/node_modules/nodeunit/share/license.js         |   11 +
 bin/node_modules/nodeunit/share/nodeunit.css       |   70 +
 .../test/fixtures/coffee/mock_coffee_module.coffee |    4 +
 .../nodeunit/test/fixtures/dir/mock_module3.js     |    1 +
 .../nodeunit/test/fixtures/dir/mock_module4.js     |    1 +
 .../nodeunit/test/fixtures/mock_module1.js         |    1 +
 .../nodeunit/test/fixtures/mock_module2.js         |    1 +
 .../nodeunit/test/fixtures/raw_jscode1.js          |    3 +
 .../nodeunit/test/fixtures/raw_jscode2.js          |    3 +
 .../nodeunit/test/fixtures/raw_jscode3.js          |    1 +
 bin/node_modules/nodeunit/test/test-base.js        |  219 ++
 .../nodeunit/test/test-failing-callbacks.js        |  114 +
 bin/node_modules/nodeunit/test/test-httputil.js    |   55 +
 bin/node_modules/nodeunit/test/test-runfiles.js    |  213 ++
 bin/node_modules/nodeunit/test/test-runmodule.js   |  177 ++
 bin/node_modules/nodeunit/test/test-runtest.js     |   46 +
 bin/node_modules/nodeunit/test/test-sandbox.js     |   31 +
 bin/node_modules/nodeunit/test/test-testcase.js    |  234 ++
 bin/node_modules/nodeunit/test/test.html           |   26 +
 bin/package.json                                   |   26 +
 bin/templates/dist/README.md                       |   90 +
 bin/templates/project/blackberry.xml               |  333 +++
 bin/templates/project/build.xml                    |  132 +
 bin/templates/project/lib/ant-contrib/LICENSE.txt  |   47 +
 .../project/lib/ant-contrib/ant-contrib-1.0b3.jar  |  Bin 0 -> 224277 bytes
 bin/templates/project/playbook.xml                 |  255 ++
 bin/templates/project/project.properties           |   97 +
 bin/templates/project/www/config.xml               |   80 +
 bin/templates/project/www/index.html               |  976 ++++++
 bin/templates/project/www/json2.js                 |  482 +++
 bin/templates/project/www/plugins.xml              |   34 +
 bin/templates/project/www/resources/icon.png       |  Bin 0 -> 6080 bytes
 .../project/www/resources/loading_foreground.png   |  Bin 0 -> 15823 bytes
 bin/test                                           |   41 +
 bin/tests/autotest.coffee                          |   24 +
 bin/tests/create.coffee                            |   40 +
 bin/tests/debug.coffee                             |   18 +
 build.xml                                          |    4 +-
 template/dist/README.md                            |   90 -
 template/project/blackberry.xml                    |  333 ---
 template/project/build.xml                         |  132 -
 template/project/lib/ant-contrib/LICENSE.txt       |   47 -
 .../project/lib/ant-contrib/ant-contrib-1.0b3.jar  |  Bin 224277 -> 0 bytes
 template/project/playbook.xml                      |  255 --
 template/project/project.properties                |   97 -
 template/project/www/config.xml                    |   80 -
 template/project/www/index.html                    |  976 ------
 template/project/www/json2.js                      |  482 ---
 template/project/www/plugins.xml                   |   34 -
 template/project/www/resources/icon.png            |  Bin 6080 -> 0 bytes
 .../project/www/resources/loading_foreground.png   |  Bin 15823 -> 0 bytes
 121 files changed, 16093 insertions(+), 2537 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 6162d9a..c21f1c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,6 @@
 
 # Eclipse
 
-bin/
-build/
 deliverables/
 .preprocessed/
 
@@ -23,4 +21,3 @@ dist/
 .DS_Store
 
 tags
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index be72a45..fd28d9a 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ Directory Structure
     framework/ ... BlackBerry WebWorks JavaScript Extension (Cordova native code)
     javascript/ .. Cordova JavaScript (Non-concatenated, non-minified)
     lib/ ......... Third party tools
-    template/ .... Project template for creating a new projects
+    bin/ ......... Scripts for project creation
 
 Introduction
 ------------
@@ -18,13 +18,13 @@ BlackBerry WebWorks is a framework for developing web-based applications for Bla
 
 The WebWorks framework allows developers to create applications using web content and resources (HTML/CSS/JavaScript) that are able to access device features through the [Blackberry WebWorks API](http://www.blackberry.com/developers/docs/widgetapi/).  In addition, the framework allows developers to create their own WebWorks JavaScript Extensions to expose additional device capabilities through JavaScript APIs.  These extensions are written using either the BlackBerry Java API for SmartPhones, or Adobe AIR for the Tablet OS.
 
-The cordova-blackberry-webworks platform allows web developers to develop applications targeting BlackBerry 5.0 and higher devices using the common [Cordova API](http://docs.phonegap.com).  When possible, Cordova makes use of the WebWorks JavaScript API; however, most Cordova features are implemented in the native Java environment as a WebWorks JavaScript Extension.
+The cordova-blackberry-webworks platform allows web developers to develop applications targeting BlackBerry 5.0 and higher devices using the common [Cordova API](http://docs.phonegap.com).  When possible, Cordova makes use of the WebWorks JavaScript API; however, most Cordova features are implemented in the native Java or AIR environment as a WebWorks JavaScript Extension.
 
 
 Getting Started
 ===============
 
-Several guides are available on the [Cordova Wiki](http://wiki.phonegap.com) to help you get started developing for the cordova-blackberry-webworks platform.  This guide will help you install and configure the BlackBerry WebWorks development environment, and the cordova-blackberry-webworks platform.  It will also step you through the process of creating a Cordova project.
+Several guides are available on the [Cordova Wiki](http://wiki.phonegap.com) and on the [PhoneGap Documentation site](http://docs.phonegap.com/) (Getting Started Guides - on the left side near the bottom) to help you get started developing for the cordova-blackberry-webworks platform.  This guide will help you install and configure the BlackBerry WebWorks development environment, and the cordova-blackberry-webworks platform.  It will also step you through the process of creating a Cordova project.
 
 [Getting Started with Cordova BlackBerry WebWorks](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks)
 
@@ -43,13 +43,75 @@ Cloning the cordova-blackberry-webworks repository always provides you with the
 
 As an alternative, you can download packaged releases of Cordova from the [PhoneGap web site](http://phonegap.com).  If choosing this method, simply unzip the Cordova packaged code and navigate to the BlackBerry/WebWorks directory.  The steps below remain the same.
 
+Cordova BlackBerry Developer Tools
+---
 
-Creating a New Cordova Project
+The Cordova developer tooling is split between general tooling and project level tooling. 
+
+To enable the command-line tools available in the ./bin directory, make
+sure you have all of the dependencies installed. You will need
+[NodeJS](http://nodejs.org) (which should come with `npm`). To install
+the dependencies:
+
+    $ cd bin
+    $ npm install
+
+General Commands
+
+    ./bin/create [path appname] ............ creates a sample app with the specified application name, to the specified path
+    ./bin/bench ............................ generate a bench proj
+    ./bin/autotest ......................... test the cli tools
+    ./bin/test ............................. run mobile-spec
+
+Please note that once you `create` a Cordova BlackBerry project, you
+will need to edit the `project.properties` file that resides inside your
+generated application directory to set up your environment properly. You
+will need to specify things like the location of the BlackBerry Widget
+Packager(s), device and signing key passwords, simulator executables,
+and device IPs (if applicable).
+
+TODO: Project Commands
+
+These commands live in a generated Cordova BlackBerry project. NOTE: not
+available yet.
+
+    ./cordova/debug [path] ..................... install to first device
+    ./cordova/emulate .......................... start avd (emulator) named default
+    ./cordova/log .............................. starts logcat
+
+Running the Example Project (TODO)
+---
+
+Start a simulator:
+
+    ./bin/emulate
+
+Create the example project and build it to the first device:
+
+    ./bin/create
+    cd example
+    ./cordova/debug
+
+Start streaming a log from the device
+
+    ./cordova/log
+
+Running the [mobile-spec](http://github.com/apache/incubator-cordova-mobile-spec) tests:
+---
+
+    ./bin/test
+
+Creating a new Cordova BlackBerry Project
+---
+
+    ./bin/create ~/Desktop/myapp MyApp
+
+(Legacy) Creating a New Cordova Project
 -------------------------------
 
-The Cordova build script enables you to create multiple, independent Cordova projects.
+The (legacy) Cordova ant build scripts enable you to create multiple, independent Cordova projects.
 
-(Note: The Cordova build script requries Apache ANT 1.8 or higher.  See the [Getting Started guide](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks) for instructions on how to install and configure Apache ANT).
+(Note: The Cordova build script requires Apache ANT 1.8 or higher.  See the [Getting Started guide](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks) for instructions on how to install and configure Apache ANT).
 
 The build script packages the Cordova source code and resources into each project you create.  This allows you to easily distribute the project to other BlackBerry WebWorks developers.  To create a Cordova project:
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/BOOM
----------------------------------------------------------------------
diff --git a/bin/BOOM b/bin/BOOM
new file mode 100755
index 0000000..266d831
--- /dev/null
+++ b/bin/BOOM
@@ -0,0 +1,21 @@
+#! /bin/sh
+#       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.
+#
+#
+./bin/create
+cd ./example && ./cordova/debug && ./cordova/log

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/autotest
----------------------------------------------------------------------
diff --git a/bin/autotest b/bin/autotest
new file mode 100755
index 0000000..647a5f5
--- /dev/null
+++ b/bin/autotest
@@ -0,0 +1,2 @@
+#! /usr/bin/env node
+require('nodeunit').reporters.default.run(['bin/tests'])

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/bench
----------------------------------------------------------------------
diff --git a/bin/bench b/bin/bench
new file mode 100755
index 0000000..f7337aa
--- /dev/null
+++ b/bin/bench
@@ -0,0 +1,47 @@
+#! /bin/sh
+#       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.
+#
+#
+#
+# Creates an app in `./bench` that posts results to http://cordova-bench.heroku.com with current cordova/Android sha.
+#
+# USAGE
+#   ./bin/bench
+#
+
+# clobber any existing bench
+if [ -e ./bench ]
+then
+    rm -rf ./bench
+fi
+
+# create a benching app
+./bin/create ./bench cordovaBench
+
+# grab the latest bench www code
+git clone git@github.com:brianleroux/cordova-bench.git
+
+# copy it into the app
+cat ./cordova-bench/www/index.html > ./bench/assets/www/index.html
+#cat ~/Desktop/cordova-bench/www/index.html > ./bench/assets/www/index.html
+
+# clean up
+rm -rf ./cordova-bench
+
+# launch to the first device found
+./bin/debug ./bench

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
new file mode 100755
index 0000000..3650b84
--- /dev/null
+++ b/bin/create
@@ -0,0 +1,77 @@
+#! /bin/sh
+#       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.
+#
+# create a cordova/android project
+# 
+# USAGE
+#   ./create [path appname]
+#
+set -e
+
+if [ -n "$1" ] && [ "$1" == "-h" ]
+then
+    echo 'usage: create path appname'
+    echo 'After you have created your application, make sure to customize the project.properties file inside your app directory with your environment specifics!'
+    exit 0
+fi
+
+BUILD_PATH=$( cd "$( dirname "$0" )/.." && pwd )
+VERSION=$(cat $BUILD_PATH/VERSION)
+
+PROJECT_PATH=${1:-"./example"}
+APPNAME=${2:-"cordovaExample"}
+
+# clobber any existing example
+if [ -d $PROJECT_PATH ]
+then
+    echo "Project already exists! Delete and recreate"
+    exit 1
+fi
+
+# cleanup after exit and/or on error
+function on_exit {
+    echo "Cleaning up ..."
+    [ -d $BUILD_PATH/build ] && rm -rf $BUILD_PATH/build
+    [ -d $BUILD_PATH/dist ] && rm -rf $BUILD_PATH/dist
+    echo "Remember to update the project.properties file inside your application directory!"
+}
+
+function on_error {
+    echo "An error occured. Deleting project..."
+    [ -d $PROJECT_PATH ] && rm -rf $PROJECT_PATH
+}
+
+# we do not want the script to silently fail
+trap on_error ERR
+trap on_exit EXIT
+
+ANT=$(which ant)
+
+MANIFEST_PATH=$PROJECT_PATH/www/config.xml
+
+# compile cordova.js and cordova.jar
+echo "Building cordova-$VERSION.jar and cordova-$VERSION.js ..."
+(cd $BUILD_PATH && $ANT dist &> /dev/null )
+
+# copy project template
+echo "Copying assets and resources ..."
+cp -r $BUILD_PATH/dist/sample/. $PROJECT_PATH
+
+# interpolate the app name into config.xml
+echo "Updating config.xml ..."
+sed -i '' -e "s/__NAME__/${APPNAME}/g" $MANIFEST_PATH

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/create.bat
----------------------------------------------------------------------
diff --git a/bin/create.bat b/bin/create.bat
new file mode 100644
index 0000000..7b0b58e
--- /dev/null
+++ b/bin/create.bat
@@ -0,0 +1,14 @@
+@ECHO OFF
+IF NOT DEFINED JAVA_HOME GOTO MISSING
+FOR %%X in (ant.bat) do (
+    SET FOUND=%%~$PATH:X
+    IF NOT DEFINED FOUND GOTO MISSING
+)
+cscript %~dp0\create.js %*
+GOTO END
+:MISSING
+ECHO Missing one of the following:
+ECHO JDK: http://java.oracle.com
+ECHO Apache ant: http://ant.apache.org
+EXIT /B 1
+:END

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/create.js
----------------------------------------------------------------------
diff --git a/bin/create.js b/bin/create.js
new file mode 100644
index 0000000..c23d49e
--- /dev/null
+++ b/bin/create.js
@@ -0,0 +1,90 @@
+/*
+       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.
+*/
+
+/*
+ * create a cordova/android project
+ *
+ * USAGE
+ *  ./create [path package activity]
+ */
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject');
+
+function read(filename) {
+    var fso=WScript.CreateObject("Scripting.FileSystemObject");
+    var f=fso.OpenTextFile(filename, 1);
+    var s=f.ReadAll();
+    f.Close();
+    return s;
+}
+function write(filename, contents) {
+    var fso=WScript.CreateObject("Scripting.FileSystemObject");
+    var f=fso.OpenTextFile(filename, 2, true);
+    f.Write(contents);
+    f.Close();
+}
+function replaceInFile(filename, regexp, replacement) {
+    write(filename, read(filename).replace(regexp, replacement));
+}
+function exec(s, output) {
+    var o=shell.Exec(s);
+    while (o.Status == 0) {
+        WScript.Sleep(100);
+    }
+    //WScript.Echo("Command exited with code " + o.Status);
+}
+
+function cleanup() {
+    // Cleanup
+    if(fso.FolderExists(ROOT + '\\dist')) {
+        fso.DeleteFolder(ROOT + '\\dist', true);
+    }
+    if(fso.FolderExists(ROOT + '\\build')) {
+        fso.DeleteFolder(ROOT + '\\build');
+    }
+}
+
+var args = WScript.Arguments, PROJECT_PATH="example", 
+    APPNAME="cordovaExample",
+    shell=WScript.CreateObject("WScript.Shell");
+    
+// working dir
+var ROOT = WScript.ScriptFullName.split('\\bin\\create.js').join('');
+
+if (args.Count() == 2) {
+    PROJECT_PATH=args(0);
+    APPNAME=args(1);
+}
+
+if(fso.FolderExists(PROJECT_PATH)) {
+    WScript.Echo("Project directory already exists! Please remove it first.");
+    WScript.Quit(1);
+}
+
+var MANIFEST_PATH=PROJECT_PATH+'\\www\\config.xml';
+var VERSION=read(ROOT+'\\VERSION').replace(/\r\n/,'').replace(/\n/,'');
+
+exec('ant.bat -f '+ ROOT +'\\build.xml dist');
+
+// copy in the project template
+exec('cmd /c xcopy '+ ROOT + '\\dist\\sample\\* '+PROJECT_PATH+' /S /Y');
+
+replaceInFile(MANIFEST_PATH, /__NAME__/, APPNAME);
+
+cleanup();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/create.xml
----------------------------------------------------------------------
diff --git a/bin/create.xml b/bin/create.xml
new file mode 100644
index 0000000..720697c
--- /dev/null
+++ b/bin/create.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+       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.
+-->
+
+<project name="cordova" default="create" basedir="../">
+
+	<property name="project.path" value="${basedir}/example"/>
+	<property name="package" value="org.apache.cordova.example"/>
+	<property name="activity" value="cordovaExample"/>
+
+	<target name="create">
+
+		<!-- this stuff is seriously stupid -->
+		<echo file="tmp/package.tmp">package-as-path=${package}</echo>
+		<replace file="tmp/package.tmp" token="." value="\\" />
+		<property file="tmp/package.tmp" />
+
+		<property name="activity.path" value="${project.path}/src/${package-as-path}/${activity}.java" />
+		<property name="manifest.path" value="${project.path}/AndroidManifest.xml" />
+
+		<!-- get the highest target on this machine -->
+		<!-- this stuff is also seriously stupid -->
+		<exec executable="cmd" osfamily="windows" output="tmp/target.list.tmp">
+			<arg line="/c android.bat list targets"/>
+		</exec>
+		<exec executable="android" osfamily="mac" output="tmp/target.list.tmp">
+			<arg line="list targets"/>
+		</exec>
+		<replaceregexp file="tmp/target.list.tmp" match=".*id:\s([0-9]).*" replace="target=\1" flags="s" />
+		<property file="tmp/target.list.tmp" />
+
+		<!-- var VERSION=read('VERSION').replace(/\r\n/,'').replace(/\n/,''); -->
+		<copy file="VERSION" tofile="tmp/VERSION.tmp" overwrite="true" />
+		<replaceregexp file="tmp/VERSION.tmp" match="^" replace="version=" />
+		<replaceregexp file="tmp/VERSION.tmp" match="\r\n" replace="" />
+		<property file="tmp/VERSION.tmp" />
+
+		<!-- clobber any existing example -->
+
+		<!-- create the project -->
+		<exec executable="cmd" osfamily="windows">
+			<arg line="/c android.bat create project --target ${target} --path ${project.path} --package ${package} --activity ${activity}"/>
+		</exec>
+		<exec executable="android" osfamily="mac">
+			<arg line="create project --target ${target} --path ${project.path} --package ${package} --activity ${activity}"/>
+		</exec>
+
+		<!-- update the framework dir -->
+		<exec executable="cmd" osfamily="windows">
+			<arg line="/c android.bat update project --target ${target} --path ${basedir}/framework"/>
+		</exec>
+		<exec executable="android" osfamily="mac">
+			<arg line="update project --target ${target} --path ${basedir}/framework"/>
+		</exec>
+
+		<!-- compile cordova.js and cordova.jar -->
+		<!--	// if you see an error about "Unable to resolve target" then you may need to 
+				// update your android tools or install an additional Android platform version -->
+		<ant antfile="${basedir}/framework/build.xml" useNativeBasedir="true" inheritAll="false" />
+
+		<!-- copy in the project template -->
+		<copy todir="${project.path}" overwrite="true">
+			<fileset dir="${basedir}/bin/templates/project"/>
+		</copy>
+
+		<!-- copy in cordova.js -->
+		<copy file="${basedir}/framework/assets/www/cordova-${version}.js" todir="${project.path}/assets/www/" />
+
+		<!-- copy in cordova.jar -->
+		<copy file="${basedir}/framework/cordova-${version}.jar" todir="${project.path}/libs/" />
+
+		<!-- copy in default activity -->
+		<copy file="${basedir}/bin/templates/Activity.java" tofile="${activity.path}" overwrite="true" />
+
+		<!-- interpolate the activity name and package -->
+		<replaceregexp file="${activity.path}" match="__ACTIVITY__" replace="${activity}" />
+		<replaceregexp file="${activity.path}" match="__ID__" replace="${package}" />
+
+		<replaceregexp file="${manifest.path}" match="__ACTIVITY__" replace="${activity}" />
+		<replaceregexp file="${manifest.path}" match="__PACKAGE__" replace="${package}" />
+	</target>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/.bin/cake
----------------------------------------------------------------------
diff --git a/bin/node_modules/.bin/cake b/bin/node_modules/.bin/cake
new file mode 120000
index 0000000..d95f32a
--- /dev/null
+++ b/bin/node_modules/.bin/cake
@@ -0,0 +1 @@
+../coffee-script/bin/cake
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/.bin/coffee
----------------------------------------------------------------------
diff --git a/bin/node_modules/.bin/coffee b/bin/node_modules/.bin/coffee
new file mode 120000
index 0000000..b57f275
--- /dev/null
+++ b/bin/node_modules/.bin/coffee
@@ -0,0 +1 @@
+../coffee-script/bin/coffee
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/.bin/nodeunit
----------------------------------------------------------------------
diff --git a/bin/node_modules/.bin/nodeunit b/bin/node_modules/.bin/nodeunit
new file mode 120000
index 0000000..f31cdbe
--- /dev/null
+++ b/bin/node_modules/.bin/nodeunit
@@ -0,0 +1 @@
+../nodeunit/bin/nodeunit
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/.npmignore
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/.npmignore b/bin/node_modules/coffee-script/.npmignore
new file mode 100644
index 0000000..21e430d
--- /dev/null
+++ b/bin/node_modules/coffee-script/.npmignore
@@ -0,0 +1,11 @@
+*.coffee
+*.html
+.DS_Store
+.git*
+Cakefile
+documentation/
+examples/
+extras/coffee-script.js
+raw/
+src/
+test/

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/LICENSE
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/LICENSE b/bin/node_modules/coffee-script/LICENSE
new file mode 100644
index 0000000..8cb3cfd
--- /dev/null
+++ b/bin/node_modules/coffee-script/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2011 Jeremy Ashkenas
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/README
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/README b/bin/node_modules/coffee-script/README
new file mode 100644
index 0000000..08f17df
--- /dev/null
+++ b/bin/node_modules/coffee-script/README
@@ -0,0 +1,48 @@
+=
+            {
+         }   }   {
+        {   {  }  }
+         }   }{  {
+        {  }{  }  }                    _____       __  __
+       ( }{ }{  { )                   / ____|     / _|/ _|
+     .- { { }  { }} -.               | |     ___ | |_| |_ ___  ___
+    (  ( } { } { } }  )              | |    / _ \|  _|  _/ _ \/ _ \
+    |`-..________ ..-'|              | |___| (_) | | | ||  __/  __/
+    |                 |               \_____\___/|_| |_| \___|\___|
+    |                 ;--.
+    |                (__  \            _____           _       _
+    |                 | )  )          / ____|         (_)     | |
+    |                 |/  /          | (___   ___ _ __ _ _ __ | |_
+    |                 (  /            \___ \ / __| '__| | '_ \| __|
+    |                 |/              ____) | (__| |  | | |_) | |_
+    |                 |              |_____/ \___|_|  |_| .__/ \__|
+     `-.._________..-'                                  | |
+                                                        |_|
+
+
+  CoffeeScript is a little language that compiles into JavaScript.
+
+  Install Node.js, and then the CoffeeScript compiler:
+  sudo bin/cake install
+
+  Or, if you have the Node Package Manager installed:
+  npm install -g coffee-script
+  (Leave off the -g if you don't wish to install globally.)
+
+  Compile a script:
+  coffee /path/to/script.coffee
+
+  For documentation, usage, and examples, see:
+  http://coffeescript.org/
+
+  To suggest a feature, report a bug, or general discussion:
+  http://github.com/jashkenas/coffee-script/issues/
+
+  If you'd like to chat, drop by #coffeescript on Freenode IRC,
+  or on webchat.freenode.net.
+
+  The source repository:
+  git://github.com/jashkenas/coffee-script.git
+
+  All contributors are listed here:
+  http://github.com/jashkenas/coffee-script/contributors

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/Rakefile
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/Rakefile b/bin/node_modules/coffee-script/Rakefile
new file mode 100644
index 0000000..dfb85da
--- /dev/null
+++ b/bin/node_modules/coffee-script/Rakefile
@@ -0,0 +1,78 @@
+require 'rubygems'
+require 'erb'
+require 'fileutils'
+require 'rake/testtask'
+require 'json'
+
+desc "Build the documentation page"
+task :doc do
+  source = 'documentation/index.html.erb'
+  child = fork { exec "bin/coffee -bcw -o documentation/js documentation/coffee/*.coffee" }
+  at_exit { Process.kill("INT", child) }
+  Signal.trap("INT") { exit }
+  loop do
+    mtime = File.stat(source).mtime
+    if !@mtime || mtime > @mtime
+      rendered = ERB.new(File.read(source)).result(binding)
+      File.open('index.html', 'w+') {|f| f.write(rendered) }
+    end
+    @mtime = mtime
+    sleep 1
+  end
+end
+
+desc "Build coffee-script-source gem"
+task :gem do
+  require 'rubygems'
+  require 'rubygems/package'
+
+  gemspec = Gem::Specification.new do |s|
+    s.name      = 'coffee-script-source'
+    s.version   = JSON.parse(File.read('package.json'))["version"]
+    s.date      = Time.now.strftime("%Y-%m-%d")
+
+    s.homepage    = "http://jashkenas.github.com/coffee-script/"
+    s.summary     = "The CoffeeScript Compiler"
+    s.description = <<-EOS
+      CoffeeScript is a little language that compiles into JavaScript.
+      Underneath all of those embarrassing braces and semicolons,
+      JavaScript has always had a gorgeous object model at its heart.
+      CoffeeScript is an attempt to expose the good parts of JavaScript
+      in a simple way.
+    EOS
+
+    s.files = [
+      'lib/coffee_script/coffee-script.js',
+      'lib/coffee_script/source.rb'
+    ]
+
+    s.authors           = ['Jeremy Ashkenas']
+    s.email             = 'jashkenas@gmail.com'
+    s.rubyforge_project = 'coffee-script-source'
+  end
+
+  file = File.open("coffee-script-source.gem", "w")
+  Gem::Package.open(file, 'w') do |pkg|
+    pkg.metadata = gemspec.to_yaml
+
+    path = "lib/coffee_script/source.rb"
+    contents = <<-ERUBY
+module CoffeeScript
+  module Source
+    def self.bundled_path
+      File.expand_path("../coffee-script.js", __FILE__)
+    end
+  end
+end
+    ERUBY
+    pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
+      tar_io.write(contents)
+    end
+
+    contents = File.read("extras/coffee-script.js")
+    path = "lib/coffee_script/coffee-script.js"
+    pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
+      tar_io.write(contents)
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/bin/cake
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/bin/cake b/bin/node_modules/coffee-script/bin/cake
new file mode 100755
index 0000000..e92e752
--- /dev/null
+++ b/bin/node_modules/coffee-script/bin/cake
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var fs   = require('fs');
+var lib  = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
+
+require(lib + '/cake').run();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/bin/coffee
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/bin/coffee b/bin/node_modules/coffee-script/bin/coffee
new file mode 100755
index 0000000..4dc0a5e
--- /dev/null
+++ b/bin/node_modules/coffee-script/bin/coffee
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var fs   = require('fs');
+var lib  = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
+
+require(lib + '/command').run();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/extras/jsl.conf
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/extras/jsl.conf b/bin/node_modules/coffee-script/extras/jsl.conf
new file mode 100644
index 0000000..1190da5
--- /dev/null
+++ b/bin/node_modules/coffee-script/extras/jsl.conf
@@ -0,0 +1,44 @@
+# JavaScriptLint configuration file for CoffeeScript.
+
++no_return_value              # function {0} does not always return a value
++duplicate_formal             # duplicate formal argument {0}
+-equal_as_assign              # test for equality (==) mistyped as assignment (=)?{0}
++var_hides_arg                # variable {0} hides argument
++redeclared_var               # redeclaration of {0} {1}
+-anon_no_return_value         # anonymous function does not always return a value
++missing_semicolon            # missing semicolon
++meaningless_block            # meaningless block; curly braces have no impact
+-comma_separated_stmts        # multiple statements separated by commas (use semicolons?)
++unreachable_code             # unreachable code
++missing_break                # missing break statement
+-missing_break_for_last_case  # missing break statement for last case in switch
+-comparison_type_conv         # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
+-inc_dec_within_stmt          # increment (++) and decrement (--) operators used as part of greater statement
+-useless_void                 # use of the void type may be unnecessary (void is always undefined)
++multiple_plus_minus          # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
++use_of_label                 # use of label
+-block_without_braces         # block statement without curly braces
++leading_decimal_point        # leading decimal point may indicate a number or an object member
++trailing_decimal_point       # trailing decimal point may indicate a number or an object member
++octal_number                 # leading zeros make an octal number
++nested_comment               # nested comment
++misplaced_regex              # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
++ambiguous_newline            # unexpected end of line; it is ambiguous whether these lines are part of the same statement
++empty_statement              # empty statement or extra semicolon
+-missing_option_explicit      # the "option explicit" control comment is missing
++partial_option_explicit      # the "option explicit" control comment, if used, must be in the first script tag
++dup_option_explicit          # duplicate "option explicit" control comment
++useless_assign               # useless assignment
++ambiguous_nested_stmt        # block statements containing block statements should use curly braces to resolve ambiguity
++ambiguous_else_stmt          # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)
+-missing_default_case         # missing default case in switch statement
++duplicate_case_in_switch     # duplicate case in switch statements
++default_not_at_end           # the default case is not at the end of the switch statement
++legacy_cc_not_understood     # couldn't understand control comment using /*@keyword@*/ syntax
++jsl_cc_not_understood        # couldn't understand control comment using /*jsl:keyword*/ syntax
++useless_comparison           # useless comparison; comparing identical expressions
++with_statement               # with statement hides undeclared variables; use temporary variable instead
++trailing_comma_in_array      # extra comma is not recommended in array initializers
++assign_to_function_call      # assignment to a function call
++parseint_missing_radix       # parseInt missing radix parameter
++lambda_assign_requires_semicolon

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/lib/browser.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/lib/browser.js b/bin/node_modules/coffee-script/lib/browser.js
new file mode 100644
index 0000000..2fb7b2e
--- /dev/null
+++ b/bin/node_modules/coffee-script/lib/browser.js
@@ -0,0 +1,75 @@
+(function() {
+  var CoffeeScript, runScripts;
+  CoffeeScript = require('./coffee-script');
+  CoffeeScript.require = require;
+  CoffeeScript.eval = function(code, options) {
+    return eval(CoffeeScript.compile(code, options));
+  };
+  CoffeeScript.run = function(code, options) {
+    if (options == null) {
+      options = {};
+    }
+    options.bare = true;
+    return Function(CoffeeScript.compile(code, options))();
+  };
+  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');
+    }
+    xhr.onreadystatechange = function() {
+      var _ref;
+      if (xhr.readyState === 4) {
+        if ((_ref = xhr.status) === 0 || _ref === 200) {
+          CoffeeScript.run(xhr.responseText);
+        } else {
+          throw new Error("Could not load " + url);
+        }
+        if (callback) {
+          return callback();
+        }
+      }
+    };
+    return xhr.send(null);
+  };
+  runScripts = function() {
+    var coffees, execute, index, length, s, scripts;
+    scripts = document.getElementsByTagName('script');
+    coffees = (function() {
+      var _i, _len, _results;
+      _results = [];
+      for (_i = 0, _len = scripts.length; _i < _len; _i++) {
+        s = scripts[_i];
+        if (s.type === 'text/coffeescript') {
+          _results.push(s);
+        }
+      }
+      return _results;
+    })();
+    index = 0;
+    length = coffees.length;
+    (execute = function() {
+      var script;
+      script = coffees[index++];
+      if ((script != null ? script.type : void 0) === 'text/coffeescript') {
+        if (script.src) {
+          return CoffeeScript.load(script.src, execute);
+        } else {
+          CoffeeScript.run(script.innerHTML);
+          return execute();
+        }
+      }
+    })();
+    return null;
+  };
+  if (window.addEventListener) {
+    addEventListener('DOMContentLoaded', runScripts, false);
+  } else {
+    attachEvent('onload', runScripts);
+  }
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/lib/cake.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/lib/cake.js b/bin/node_modules/coffee-script/lib/cake.js
new file mode 100755
index 0000000..6619934
--- /dev/null
+++ b/bin/node_modules/coffee-script/lib/cake.js
@@ -0,0 +1,76 @@
+(function() {
+  var CoffeeScript, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks;
+  fs = require('fs');
+  path = require('path');
+  helpers = require('./helpers');
+  optparse = require('./optparse');
+  CoffeeScript = require('./coffee-script');
+  tasks = {};
+  options = {};
+  switches = [];
+  oparse = null;
+  helpers.extend(global, {
+    task: function(name, description, action) {
+      var _ref;
+      if (!action) {
+        _ref = [description, action], action = _ref[0], description = _ref[1];
+      }
+      return tasks[name] = {
+        name: name,
+        description: description,
+        action: action
+      };
+    },
+    option: function(letter, flag, description) {
+      return switches.push([letter, flag, description]);
+    },
+    invoke: function(name) {
+      if (!tasks[name]) {
+        missingTask(name);
+      }
+      return tasks[name].action(options);
+    }
+  });
+  exports.run = function() {
+    return path.exists('Cakefile', function(exists) {
+      var arg, args, _i, _len, _ref, _results;
+      if (!exists) {
+        throw new Error("Cakefile not found in " + (process.cwd()));
+      }
+      args = process.argv.slice(2);
+      CoffeeScript.run(fs.readFileSync('Cakefile').toString(), {
+        filename: 'Cakefile'
+      });
+      oparse = new optparse.OptionParser(switches);
+      if (!args.length) {
+        return printTasks();
+      }
+      options = oparse.parse(args);
+      _ref = options.arguments;
+      _results = [];
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        arg = _ref[_i];
+        _results.push(invoke(arg));
+      }
+      return _results;
+    });
+  };
+  printTasks = function() {
+    var desc, name, spaces, task;
+    console.log('');
+    for (name in tasks) {
+      task = tasks[name];
+      spaces = 20 - name.length;
+      spaces = spaces > 0 ? Array(spaces + 1).join(' ') : '';
+      desc = task.description ? "# " + task.description : '';
+      console.log("cake " + name + spaces + " " + desc);
+    }
+    if (switches.length) {
+      return console.log(oparse.help());
+    }
+  };
+  missingTask = function(task) {
+    console.log("No such task: \"" + task + "\"");
+    return process.exit(1);
+  };
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/lib/coffee-script.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/lib/coffee-script.js b/bin/node_modules/coffee-script/lib/coffee-script.js
new file mode 100755
index 0000000..2871279
--- /dev/null
+++ b/bin/node_modules/coffee-script/lib/coffee-script.js
@@ -0,0 +1,135 @@
+(function() {
+  var Lexer, RESERVED, compile, fs, lexer, parser, path, _ref;
+  var __hasProp = Object.prototype.hasOwnProperty;
+  fs = require('fs');
+  path = require('path');
+  _ref = require('./lexer'), Lexer = _ref.Lexer, RESERVED = _ref.RESERVED;
+  parser = require('./parser').parser;
+  if (require.extensions) {
+    require.extensions['.coffee'] = function(module, filename) {
+      var content;
+      content = compile(fs.readFileSync(filename, 'utf8'), {
+        filename: filename
+      });
+      return module._compile(content, filename);
+    };
+  } else if (require.registerExtension) {
+    require.registerExtension('.coffee', function(content) {
+      return compile(content);
+    });
+  }
+  exports.VERSION = '1.1.2';
+  exports.RESERVED = RESERVED;
+  exports.helpers = require('./helpers');
+  exports.compile = compile = function(code, options) {
+    if (options == null) {
+      options = {};
+    }
+    try {
+      return (parser.parse(lexer.tokenize(code))).compile(options);
+    } catch (err) {
+      if (options.filename) {
+        err.message = "In " + options.filename + ", " + err.message;
+      }
+      throw err;
+    }
+  };
+  exports.tokens = function(code, options) {
+    return lexer.tokenize(code, options);
+  };
+  exports.nodes = function(source, options) {
+    if (typeof source === 'string') {
+      return parser.parse(lexer.tokenize(source, options));
+    } else {
+      return parser.parse(source);
+    }
+  };
+  exports.run = function(code, options) {
+    var Module, mainModule;
+    mainModule = require.main;
+    mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.';
+    mainModule.moduleCache && (mainModule.moduleCache = {});
+    if (process.binding('natives').module) {
+      Module = require('module').Module;
+      mainModule.paths = Module._nodeModulePaths(path.dirname(options.filename));
+    }
+    if (path.extname(mainModule.filename) !== '.coffee' || require.extensions) {
+      return mainModule._compile(compile(code, options), mainModule.filename);
+    } else {
+      return mainModule._compile(code, mainModule.filename);
+    }
+  };
+  exports.eval = function(code, options) {
+    var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref2, _ref3, _ref4, _require;
+    if (options == null) {
+      options = {};
+    }
+    if (!(code = code.trim())) {
+      return;
+    }
+    if (_ref2 = require('vm'), Script = _ref2.Script, _ref2) {
+      sandbox = Script.createContext();
+      sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox;
+      if (options.sandbox != null) {
+        if (options.sandbox instanceof sandbox.constructor) {
+          sandbox = options.sandbox;
+        } else {
+          _ref3 = options.sandbox;
+          for (k in _ref3) {
+            if (!__hasProp.call(_ref3, k)) continue;
+            v = _ref3[k];
+            sandbox[k] = v;
+          }
+        }
+      }
+      sandbox.__filename = options.filename || 'eval';
+      sandbox.__dirname = path.dirname(sandbox.__filename);
+      if (!(sandbox.module || sandbox.require)) {
+        Module = require('module');
+        sandbox.module = _module = new Module(options.modulename || 'eval');
+        sandbox.require = _require = function(path) {
+          return Module._load(path, _module);
+        };
+        _module.filename = sandbox.__filename;
+        _ref4 = Object.getOwnPropertyNames(require);
+        for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+          r = _ref4[_i];
+          _require[r] = require[r];
+        }
+        _require.paths = _module.paths = Module._nodeModulePaths(process.cwd());
+        _require.resolve = function(request) {
+          return Module._resolveFilename(request, _module);
+        };
+      }
+    }
+    o = {};
+    for (k in options) {
+      if (!__hasProp.call(options, k)) continue;
+      v = options[k];
+      o[k] = v;
+    }
+    o.bare = true;
+    js = compile(code, o);
+    if (Script) {
+      return Script.runInContext(js, sandbox);
+    } else {
+      return eval(js);
+    }
+  };
+  lexer = new Lexer;
+  parser.lexer = {
+    lex: function() {
+      var tag, _ref2;
+      _ref2 = this.tokens[this.pos++] || [''], tag = _ref2[0], this.yytext = _ref2[1], this.yylineno = _ref2[2];
+      return tag;
+    },
+    setInput: function(tokens) {
+      this.tokens = tokens;
+      return this.pos = 0;
+    },
+    upcomingInput: function() {
+      return "";
+    }
+  };
+  parser.yy = require('./nodes');
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/lib/command.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/lib/command.js b/bin/node_modules/coffee-script/lib/command.js
new file mode 100644
index 0000000..ca25502
--- /dev/null
+++ b/bin/node_modules/coffee-script/lib/command.js
@@ -0,0 +1,301 @@
+(function() {
+  var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compileScript, compileScripts, compileStdio, contents, exec, forkNode, fs, helpers, lint, loadRequires, optionParser, optparse, opts, parseOptions, path, printLine, printTokens, printWarn, sources, spawn, usage, version, watch, writeJs, _ref;
+  fs = require('fs');
+  path = require('path');
+  helpers = require('./helpers');
+  optparse = require('./optparse');
+  CoffeeScript = require('./coffee-script');
+  _ref = require('child_process'), spawn = _ref.spawn, exec = _ref.exec;
+  EventEmitter = require('events').EventEmitter;
+  helpers.extend(CoffeeScript, new EventEmitter);
+  printLine = function(line) {
+    return process.stdout.write(line + '\n');
+  };
+  printWarn = function(line) {
+    return process.binding('stdio').writeError(line + '\n');
+  };
+  BANNER = 'Usage: coffee [options] path/to/script.coffee';
+  SWITCHES = [['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-o', '--output [DIR]', 'set the directory for compiled JavaScript'], ['-j', '--join [FILE]', 'concatenate the scripts before compiling'], ['-w', '--watch', 'watch scripts for changes, and recompile'], ['-p', '--print', 'print the compiled JavaScript to stdout'], ['-l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-e', '--eval', 'compile a string from the command line'], ['-r', '--require [FILE*]', 'require a library before executing your script'], ['-b', '--bare', 'compile without the top-level function wrapper'], ['-t', '--tokens', 'print the tokens that the lexer produces'], ['-n', '--nodes', 'print the parse tree that Jison produces'], ['--nodejs [ARGS]', 'pass options through to the "node" binary'], ['-v', '--version', 'display CoffeeScript versi
 on'], ['-h', '--help', 'display this help message']];
+  opts = {};
+  sources = [];
+  contents = [];
+  optionParser = null;
+  exports.run = function() {
+    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.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 = process.argv.slice(0, 2).concat(opts.literals);
+    process.argv[0] = 'coffee';
+    process.execPath = require.main.filename;
+    return compileScripts();
+  };
+  compileScripts = function() {
+    var base, compile, source, unprocessed, _i, _j, _len, _len2, _results;
+    unprocessed = [];
+    for (_i = 0, _len = sources.length; _i < _len; _i++) {
+      source = sources[_i];
+      unprocessed[sources.indexOf(source)] = 1;
+    }
+    _results = [];
+    for (_j = 0, _len2 = sources.length; _j < _len2; _j++) {
+      source = sources[_j];
+      base = path.join(source);
+      compile = function(source, sourceIndex, topLevel) {
+        var remaining_files;
+        remaining_files = function() {
+          var total, x, _k, _len3;
+          total = 0;
+          for (_k = 0, _len3 = unprocessed.length; _k < _len3; _k++) {
+            x = unprocessed[_k];
+            total += x;
+          }
+          return total;
+        };
+        return path.exists(source, function(exists) {
+          if (topLevel && !exists && source.slice(-7) !== '.coffee') {
+            return compile("" + source + ".coffee", sourceIndex, topLevel);
+          }
+          if (topLevel && !exists) {
+            throw new Error("File not found: " + source);
+          }
+          return fs.stat(source, function(err, stats) {
+            if (err) {
+              throw err;
+            }
+            if (stats.isDirectory()) {
+              return fs.readdir(source, function(err, files) {
+                var file, _k, _len3;
+                if (err) {
+                  throw err;
+                }
+                unprocessed[sourceIndex] += files.length;
+                for (_k = 0, _len3 = files.length; _k < _len3; _k++) {
+                  file = files[_k];
+                  compile(path.join(source, file), sourceIndex);
+                }
+                return unprocessed[sourceIndex] -= 1;
+              });
+            } else if (topLevel || path.extname(source) === '.coffee') {
+              fs.readFile(source, function(err, code) {
+                if (err) {
+                  throw err;
+                }
+                unprocessed[sourceIndex] -= 1;
+                if (opts.join) {
+                  contents[sourceIndex] = helpers.compact([contents[sourceIndex], code.toString()]).join('\n');
+                  if (helpers.compact(contents).length > 0 && remaining_files() === 0) {
+                    return compileJoin();
+                  }
+                } else {
+                  return compileScript(source, code.toString(), base);
+                }
+              });
+              if (opts.watch && !opts.join) {
+                return watch(source, base);
+              }
+            } else {
+              return unprocessed[sourceIndex] -= 1;
+            }
+          });
+        });
+      };
+      _results.push(compile(source, sources.indexOf(source), true));
+    }
+    return _results;
+  };
+  compileScript = function(file, input, base) {
+    var o, options, t, task;
+    o = opts;
+    options = compileOptions(file);
+    try {
+      t = task = {
+        file: file,
+        input: input,
+        options: options
+      };
+      CoffeeScript.emit('compile', task);
+      if (o.tokens) {
+        return printTokens(CoffeeScript.tokens(t.input));
+      } else if (o.nodes) {
+        return printLine(CoffeeScript.nodes(t.input).toString().trim());
+      } else if (o.run) {
+        return CoffeeScript.run(t.input, t.options);
+      } else {
+        t.output = CoffeeScript.compile(t.input, t.options);
+        CoffeeScript.emit('success', task);
+        if (o.print) {
+          return printLine(t.output.trim());
+        } else if (o.compile) {
+          return writeJs(t.file, t.output, base);
+        } else if (o.lint) {
+          return lint(t.file, t.output);
+        }
+      }
+    } catch (err) {
+      CoffeeScript.emit('failure', err, task);
+      if (CoffeeScript.listeners('failure').length) {
+        return;
+      }
+      if (o.watch) {
+        return printLine(err.message);
+      }
+      printWarn(err.stack);
+      return process.exit(1);
+    }
+  };
+  compileStdio = function() {
+    var code, stdin;
+    code = '';
+    stdin = process.openStdin();
+    stdin.on('data', function(buffer) {
+      if (buffer) {
+        return code += buffer.toString();
+      }
+    });
+    return stdin.on('end', function() {
+      return compileScript(null, code);
+    });
+  };
+  compileJoin = function() {
+    var code;
+    code = contents.join('\n');
+    return compileScript(opts.join, code, opts.join);
+  };
+  loadRequires = function() {
+    var realFilename, req, _i, _len, _ref2;
+    realFilename = module.filename;
+    module.filename = '.';
+    _ref2 = opts.require;
+    for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+      req = _ref2[_i];
+      require(req);
+    }
+    return module.filename = realFilename;
+  };
+  watch = function(source, base) {
+    return fs.watchFile(source, {
+      persistent: true,
+      interval: 500
+    }, function(curr, prev) {
+      if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
+        return;
+      }
+      return fs.readFile(source, function(err, code) {
+        if (err) {
+          throw err;
+        }
+        return compileScript(source, code.toString(), base);
+      });
+    });
+  };
+  writeJs = function(source, js, base) {
+    var baseDir, compile, dir, filename, jsPath, srcDir;
+    filename = path.basename(source, path.extname(source)) + '.js';
+    srcDir = path.dirname(source);
+    baseDir = base === '.' ? srcDir : srcDir.substring(base.length);
+    dir = opts.output ? path.join(opts.output, baseDir) : srcDir;
+    jsPath = path.join(dir, filename);
+    compile = function() {
+      if (js.length <= 0) {
+        js = ' ';
+      }
+      return fs.writeFile(jsPath, js, function(err) {
+        if (err) {
+          return printLine(err.message);
+        } else if (opts.compile && opts.watch) {
+          return console.log("" + ((new Date).toLocaleTimeString()) + " - compiled " + source);
+        }
+      });
+    };
+    return path.exists(dir, function(exists) {
+      if (exists) {
+        return compile();
+      } else {
+        return exec("mkdir -p " + dir, compile);
+      }
+    });
+  };
+  lint = function(file, js) {
+    var conf, jsl, printIt;
+    printIt = function(buffer) {
+      return printLine(file + ':\t' + buffer.toString().trim());
+    };
+    conf = __dirname + '/../extras/jsl.conf';
+    jsl = spawn('jsl', ['-nologo', '-stdin', '-conf', conf]);
+    jsl.stdout.on('data', printIt);
+    jsl.stderr.on('data', printIt);
+    jsl.stdin.write(js);
+    return jsl.stdin.end();
+  };
+  printTokens = function(tokens) {
+    var strings, tag, token, value;
+    strings = (function() {
+      var _i, _len, _ref2, _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];
+        _results.push("[" + tag + " " + value + "]");
+      }
+      return _results;
+    })();
+    return printLine(strings.join(' '));
+  };
+  parseOptions = function() {
+    var o;
+    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));
+    return sources = o.arguments;
+  };
+  compileOptions = function(filename) {
+    return {
+      filename: filename,
+      bare: opts.bare
+    };
+  };
+  forkNode = function() {
+    var args, nodeArgs;
+    nodeArgs = opts.nodejs.split(/\s+/);
+    args = process.argv.slice(1);
+    args.splice(args.indexOf('--nodejs'), 2);
+    return spawn(process.execPath, nodeArgs.concat(args), {
+      cwd: process.cwd(),
+      env: process.env,
+      customFds: [0, 1, 2]
+    });
+  };
+  usage = function() {
+    return printLine((new optparse.OptionParser(SWITCHES, BANNER)).help());
+  };
+  version = function() {
+    return printLine("CoffeeScript version " + CoffeeScript.VERSION);
+  };
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/lib/grammar.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/lib/grammar.js b/bin/node_modules/coffee-script/lib/grammar.js
new file mode 100644
index 0000000..e0bc41f
--- /dev/null
+++ b/bin/node_modules/coffee-script/lib/grammar.js
@@ -0,0 +1,591 @@
+(function() {
+  var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap;
+  Parser = require('jison').Parser;
+  unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/;
+  o = function(patternString, action, options) {
+    var match;
+    patternString = patternString.replace(/\s{2,}/g, ' ');
+    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.$&');
+    return [patternString, "$$ = " + action + ";", options];
+  };
+  grammar = {
+    Root: [
+      o('', function() {
+        return new Block;
+      }), o('Body'), o('Block TERMINATOR')
+    ],
+    Body: [
+      o('Line', function() {
+        return Block.wrap([$1]);
+      }), o('Body TERMINATOR Line', function() {
+        return $1.push($3);
+      }), o('Body TERMINATOR')
+    ],
+    Line: [o('Expression'), o('Statement')],
+    Statement: [
+      o('Return'), o('Throw'), o('Comment'), o('STATEMENT', function() {
+        return new Literal($1);
+      })
+    ],
+    Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class')],
+    Block: [
+      o('INDENT OUTDENT', function() {
+        return new Block;
+      }), o('INDENT Body OUTDENT', function() {
+        return $2;
+      })
+    ],
+    Identifier: [
+      o('IDENTIFIER', function() {
+        return new Literal($1);
+      })
+    ],
+    AlphaNumeric: [
+      o('NUMBER', function() {
+        return new Literal($1);
+      }), o('STRING', function() {
+        return new Literal($1);
+      })
+    ],
+    Literal: [
+      o('AlphaNumeric'), o('JS', function() {
+        return new Literal($1);
+      }), o('REGEX', function() {
+        return new Literal($1);
+      }), o('BOOL', function() {
+        var val;
+        val = new Literal($1);
+        if ($1 === 'undefined') {
+          val.isUndefined = true;
+        }
+        return val;
+      })
+    ],
+    Assign: [
+      o('Assignable = Expression', function() {
+        return new Assign($1, $3);
+      }), o('Assignable = INDENT Expression OUTDENT', function() {
+        return new Assign($1, $4);
+      })
+    ],
+    AssignObj: [
+      o('ObjAssignable', function() {
+        return new Value($1);
+      }), o('ObjAssignable : Expression', function() {
+        return new Assign(new Value($1), $3, 'object');
+      }), o('ObjAssignable :\
+       INDENT Expression OUTDENT', function() {
+        return new Assign(new Value($1), $4, 'object');
+      }), o('Comment')
+    ],
+    ObjAssignable: [o('Identifier'), o('AlphaNumeric'), o('ThisProperty')],
+    Return: [
+      o('RETURN Expression', function() {
+        return new Return($2);
+      }), o('RETURN', function() {
+        return new Return;
+      })
+    ],
+    Comment: [
+      o('HERECOMMENT', function() {
+        return new Comment($1);
+      })
+    ],
+    Code: [
+      o('PARAM_START ParamList PARAM_END FuncGlyph Block', function() {
+        return new Code($2, $5, $4);
+      }), o('FuncGlyph Block', function() {
+        return new Code([], $2, $1);
+      })
+    ],
+    FuncGlyph: [
+      o('->', function() {
+        return 'func';
+      }), o('=>', function() {
+        return 'boundfunc';
+      })
+    ],
+    OptComma: [o(''), o(',')],
+    ParamList: [
+      o('', function() {
+        return [];
+      }), o('Param', function() {
+        return [$1];
+      }), o('ParamList , Param', function() {
+        return $1.concat($3);
+      })
+    ],
+    Param: [
+      o('ParamVar', function() {
+        return new Param($1);
+      }), o('ParamVar ...', function() {
+        return new Param($1, null, true);
+      }), o('ParamVar = Expression', function() {
+        return new Param($1, $3);
+      })
+    ],
+    ParamVar: [o('Identifier'), o('ThisProperty'), o('Array'), o('Object')],
+    Splat: [
+      o('Expression ...', function() {
+        return new Splat($1);
+      })
+    ],
+    SimpleAssignable: [
+      o('Identifier', function() {
+        return new Value($1);
+      }), o('Value Accessor', function() {
+        return $1.push($2);
+      }), o('Invocation Accessor', function() {
+        return new Value($1, [$2]);
+      }), o('ThisProperty')
+    ],
+    Assignable: [
+      o('SimpleAssignable'), o('Array', function() {
+        return new Value($1);
+      }), o('Object', function() {
+        return new Value($1);
+      })
+    ],
+    Value: [
+      o('Assignable'), o('Literal', function() {
+        return new Value($1);
+      }), o('Parenthetical', function() {
+        return new Value($1);
+      }), o('Range', function() {
+        return new Value($1);
+      }), o('This')
+    ],
+    Accessor: [
+      o('.  Identifier', function() {
+        return new Access($2);
+      }), o('?. Identifier', function() {
+        return new Access($2, 'soak');
+      }), o(':: Identifier', function() {
+        return new Access($2, 'proto');
+      }), o('::', function() {
+        return new Access(new Literal('prototype'));
+      }), o('Index')
+    ],
+    Index: [
+      o('INDEX_START IndexValue INDEX_END', function() {
+        return $2;
+      }), o('INDEX_SOAK  Index', function() {
+        return extend($2, {
+          soak: true
+        });
+      }), o('INDEX_PROTO Index', function() {
+        return extend($2, {
+          proto: true
+        });
+      })
+    ],
+    IndexValue: [
+      o('Expression', function() {
+        return new Index($1);
+      }), o('Slice', function() {
+        return new Slice($1);
+      })
+    ],
+    Object: [
+      o('{ AssignList OptComma }', function() {
+        return new Obj($2, $1.generated);
+      })
+    ],
+    AssignList: [
+      o('', function() {
+        return [];
+      }), o('AssignObj', function() {
+        return [$1];
+      }), o('AssignList , AssignObj', function() {
+        return $1.concat($3);
+      }), o('AssignList OptComma TERMINATOR AssignObj', function() {
+        return $1.concat($4);
+      }), o('AssignList OptComma INDENT AssignList OptComma OUTDENT', function() {
+        return $1.concat($4);
+      })
+    ],
+    Class: [
+      o('CLASS', function() {
+        return new Class;
+      }), o('CLASS Block', function() {
+        return new Class(null, null, $2);
+      }), o('CLASS EXTENDS Value', function() {
+        return new Class(null, $3);
+      }), o('CLASS EXTENDS Value Block', function() {
+        return new Class(null, $3, $4);
+      }), o('CLASS SimpleAssignable', function() {
+        return new Class($2);
+      }), o('CLASS SimpleAssignable Block', function() {
+        return new Class($2, null, $3);
+      }), o('CLASS SimpleAssignable EXTENDS Value', function() {
+        return new Class($2, $4);
+      }), o('CLASS SimpleAssignable EXTENDS Value Block', function() {
+        return new Class($2, $4, $5);
+      })
+    ],
+    Invocation: [
+      o('Value OptFuncExist Arguments', function() {
+        return new Call($1, $3, $2);
+      }), o('Invocation OptFuncExist Arguments', function() {
+        return new Call($1, $3, $2);
+      }), o('SUPER', function() {
+        return new Call('super', [new Splat(new Literal('arguments'))]);
+      }), o('SUPER Arguments', function() {
+        return new Call('super', $2);
+      })
+    ],
+    OptFuncExist: [
+      o('', function() {
+        return false;
+      }), o('FUNC_EXIST', function() {
+        return true;
+      })
+    ],
+    Arguments: [
+      o('CALL_START CALL_END', function() {
+        return [];
+      }), o('CALL_START ArgList OptComma CALL_END', function() {
+        return $2;
+      })
+    ],
+    This: [
+      o('THIS', function() {
+        return new Value(new Literal('this'));
+      }), o('@', function() {
+        return new Value(new Literal('this'));
+      })
+    ],
+    ThisProperty: [
+      o('@ Identifier', function() {
+        return new Value(new Literal('this'), [new Access($2)], 'this');
+      })
+    ],
+    Array: [
+      o('[ ]', function() {
+        return new Arr([]);
+      }), o('[ ArgList OptComma ]', function() {
+        return new Arr($2);
+      })
+    ],
+    RangeDots: [
+      o('..', function() {
+        return 'inclusive';
+      }), o('...', function() {
+        return 'exclusive';
+      })
+    ],
+    Range: [
+      o('[ Expression RangeDots Expression ]', function() {
+        return new Range($2, $4, $3);
+      })
+    ],
+    Slice: [
+      o('Expression RangeDots Expression', function() {
+        return new Range($1, $3, $2);
+      }), o('Expression RangeDots', function() {
+        return new Range($1, null, $2);
+      }), o('RangeDots Expression', function() {
+        return new Range(null, $2, $1);
+      })
+    ],
+    ArgList: [
+      o('Arg', function() {
+        return [$1];
+      }), o('ArgList , Arg', function() {
+        return $1.concat($3);
+      }), o('ArgList OptComma TERMINATOR Arg', function() {
+        return $1.concat($4);
+      }), o('INDENT ArgList OptComma OUTDENT', function() {
+        return $2;
+      }), o('ArgList OptComma INDENT ArgList OptComma OUTDENT', function() {
+        return $1.concat($4);
+      })
+    ],
+    Arg: [o('Expression'), o('Splat')],
+    SimpleArgs: [
+      o('Expression'), o('SimpleArgs , Expression', function() {
+        return [].concat($1, $3);
+      })
+    ],
+    Try: [
+      o('TRY Block', function() {
+        return new Try($2);
+      }), o('TRY Block Catch', function() {
+        return new Try($2, $3[0], $3[1]);
+      }), o('TRY Block FINALLY Block', function() {
+        return new Try($2, null, null, $4);
+      }), o('TRY Block Catch FINALLY Block', function() {
+        return new Try($2, $3[0], $3[1], $5);
+      })
+    ],
+    Catch: [
+      o('CATCH Identifier Block', function() {
+        return [$2, $3];
+      })
+    ],
+    Throw: [
+      o('THROW Expression', function() {
+        return new Throw($2);
+      })
+    ],
+    Parenthetical: [
+      o('( Body )', function() {
+        return new Parens($2);
+      }), o('( INDENT Body OUTDENT )', function() {
+        return new Parens($3);
+      })
+    ],
+    WhileSource: [
+      o('WHILE Expression', function() {
+        return new While($2);
+      }), o('WHILE Expression WHEN Expression', function() {
+        return new While($2, {
+          guard: $4
+        });
+      }), o('UNTIL Expression', function() {
+        return new While($2, {
+          invert: true
+        });
+      }), o('UNTIL Expression WHEN Expression', function() {
+        return new While($2, {
+          invert: true,
+          guard: $4
+        });
+      })
+    ],
+    While: [
+      o('WhileSource Block', function() {
+        return $1.addBody($2);
+      }), o('Statement  WhileSource', function() {
+        return $2.addBody(Block.wrap([$1]));
+      }), o('Expression WhileSource', function() {
+        return $2.addBody(Block.wrap([$1]));
+      }), o('Loop', function() {
+        return $1;
+      })
+    ],
+    Loop: [
+      o('LOOP Block', function() {
+        return new While(new Literal('true')).addBody($2);
+      }), o('LOOP Expression', function() {
+        return new While(new Literal('true')).addBody(Block.wrap([$2]));
+      })
+    ],
+    For: [
+      o('Statement  ForBody', function() {
+        return new For($1, $2);
+      }), o('Expression ForBody', function() {
+        return new For($1, $2);
+      }), o('ForBody    Block', function() {
+        return new For($2, $1);
+      })
+    ],
+    ForBody: [
+      o('FOR Range', function() {
+        return {
+          source: new Value($2)
+        };
+      }), o('ForStart ForSource', function() {
+        $2.own = $1.own;
+        $2.name = $1[0];
+        $2.index = $1[1];
+        return $2;
+      })
+    ],
+    ForStart: [
+      o('FOR ForVariables', function() {
+        return $2;
+      }), o('FOR OWN ForVariables', function() {
+        $3.own = true;
+        return $3;
+      })
+    ],
+    ForValue: [
+      o('Identifier'), o('Array', function() {
+        return new Value($1);
+      }), o('Object', function() {
+        return new Value($1);
+      })
+    ],
+    ForVariables: [
+      o('ForValue', function() {
+        return [$1];
+      }), o('ForValue , ForValue', function() {
+        return [$1, $3];
+      })
+    ],
+    ForSource: [
+      o('FORIN Expression', function() {
+        return {
+          source: $2
+        };
+      }), o('FOROF Expression', function() {
+        return {
+          source: $2,
+          object: true
+        };
+      }), o('FORIN Expression WHEN Expression', function() {
+        return {
+          source: $2,
+          guard: $4
+        };
+      }), o('FOROF Expression WHEN Expression', function() {
+        return {
+          source: $2,
+          guard: $4,
+          object: true
+        };
+      }), o('FORIN Expression BY Expression', function() {
+        return {
+          source: $2,
+          step: $4
+        };
+      }), o('FORIN Expression WHEN Expression BY Expression', function() {
+        return {
+          source: $2,
+          guard: $4,
+          step: $6
+        };
+      }), o('FORIN Expression BY Expression WHEN Expression', function() {
+        return {
+          source: $2,
+          step: $4,
+          guard: $6
+        };
+      })
+    ],
+    Switch: [
+      o('SWITCH Expression INDENT Whens OUTDENT', function() {
+        return new Switch($2, $4);
+      }), o('SWITCH Expression INDENT Whens ELSE Block OUTDENT', function() {
+        return new Switch($2, $4, $6);
+      }), o('SWITCH INDENT Whens OUTDENT', function() {
+        return new Switch(null, $3);
+      }), o('SWITCH INDENT Whens ELSE Block OUTDENT', function() {
+        return new Switch(null, $3, $5);
+      })
+    ],
+    Whens: [
+      o('When'), o('Whens When', function() {
+        return $1.concat($2);
+      })
+    ],
+    When: [
+      o('LEADING_WHEN SimpleArgs Block', function() {
+        return [[$2, $3]];
+      }), o('LEADING_WHEN SimpleArgs Block TERMINATOR', function() {
+        return [[$2, $3]];
+      })
+    ],
+    IfBlock: [
+      o('IF Expression Block', function() {
+        return new If($2, $3, {
+          type: $1
+        });
+      }), o('IfBlock ELSE IF Expression Block', function() {
+        return $1.addElse(new If($4, $5, {
+          type: $3
+        }));
+      })
+    ],
+    If: [
+      o('IfBlock'), o('IfBlock ELSE Block', function() {
+        return $1.addElse($3);
+      }), o('Statement  POST_IF Expression', function() {
+        return new If($3, Block.wrap([$1]), {
+          type: $2,
+          statement: true
+        });
+      }), o('Expression POST_IF Expression', function() {
+        return new If($3, Block.wrap([$1]), {
+          type: $2,
+          statement: true
+        });
+      })
+    ],
+    Operation: [
+      o('UNARY Expression', function() {
+        return new Op($1, $2);
+      }), o('-     Expression', (function() {
+        return new Op('-', $2);
+      }), {
+        prec: 'UNARY'
+      }), o('+     Expression', (function() {
+        return new Op('+', $2);
+      }), {
+        prec: 'UNARY'
+      }), o('-- SimpleAssignable', function() {
+        return new Op('--', $2);
+      }), o('++ SimpleAssignable', function() {
+        return new Op('++', $2);
+      }), o('SimpleAssignable --', function() {
+        return new Op('--', $1, null, true);
+      }), o('SimpleAssignable ++', function() {
+        return new Op('++', $1, null, true);
+      }), o('Expression ?', function() {
+        return new Existence($1);
+      }), o('Expression +  Expression', function() {
+        return new Op('+', $1, $3);
+      }), o('Expression -  Expression', function() {
+        return new Op('-', $1, $3);
+      }), o('Expression MATH     Expression', function() {
+        return new Op($2, $1, $3);
+      }), o('Expression SHIFT    Expression', function() {
+        return new Op($2, $1, $3);
+      }), o('Expression COMPARE  Expression', function() {
+        return new Op($2, $1, $3);
+      }), o('Expression LOGIC    Expression', function() {
+        return new Op($2, $1, $3);
+      }), o('Expression RELATION Expression', function() {
+        if ($2.charAt(0) === '!') {
+          return new Op($2.slice(1), $1, $3).invert();
+        } else {
+          return new Op($2, $1, $3);
+        }
+      }), o('SimpleAssignable COMPOUND_ASSIGN\
+       Expression', function() {
+        return new Assign($1, $3, $2);
+      }), o('SimpleAssignable COMPOUND_ASSIGN\
+       INDENT Expression OUTDENT', function() {
+        return new Assign($1, $4, $2);
+      }), o('SimpleAssignable EXTENDS Expression', function() {
+        return new Extends($1, $3);
+      })
+    ]
+  };
+  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']];
+  tokens = [];
+  for (name in grammar) {
+    alternatives = grammar[name];
+    grammar[name] = (function() {
+      var _i, _j, _len, _len2, _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++) {
+          token = _ref[_j];
+          if (!grammar[token]) {
+            tokens.push(token);
+          }
+        }
+        if (name === 'Root') {
+          alt[1] = "return " + alt[1];
+        }
+        _results.push(alt);
+      }
+      return _results;
+    })();
+  }
+  exports.parser = new Parser({
+    tokens: tokens.join(' '),
+    bnf: grammar,
+    operators: operators.reverse(),
+    startSymbol: 'Root'
+  });
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/lib/helpers.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/lib/helpers.js b/bin/node_modules/coffee-script/lib/helpers.js
new file mode 100644
index 0000000..89be573
--- /dev/null
+++ b/bin/node_modules/coffee-script/lib/helpers.js
@@ -0,0 +1,66 @@
+(function() {
+  var extend, flatten;
+  exports.starts = function(string, literal, start) {
+    return literal === string.substr(start, literal.length);
+  };
+  exports.ends = function(string, literal, back) {
+    var len;
+    len = literal.length;
+    return literal === string.substr(string.length - len - (back || 0), len);
+  };
+  exports.compact = function(array) {
+    var item, _i, _len, _results;
+    _results = [];
+    for (_i = 0, _len = array.length; _i < _len; _i++) {
+      item = array[_i];
+      if (item) {
+        _results.push(item);
+      }
+    }
+    return _results;
+  };
+  exports.count = function(string, substr) {
+    var num, pos;
+    num = pos = 0;
+    if (!substr.length) {
+      return 1 / 0;
+    }
+    while (pos = 1 + string.indexOf(substr, pos)) {
+      num++;
+    }
+    return num;
+  };
+  exports.merge = function(options, overrides) {
+    return extend(extend({}, options), overrides);
+  };
+  extend = exports.extend = function(object, properties) {
+    var key, val;
+    for (key in properties) {
+      val = properties[key];
+      object[key] = val;
+    }
+    return object;
+  };
+  exports.flatten = flatten = function(array) {
+    var element, flattened, _i, _len;
+    flattened = [];
+    for (_i = 0, _len = array.length; _i < _len; _i++) {
+      element = array[_i];
+      if (element instanceof Array) {
+        flattened = flattened.concat(flatten(element));
+      } else {
+        flattened.push(element);
+      }
+    }
+    return flattened;
+  };
+  exports.del = function(obj, key) {
+    var val;
+    val = obj[key];
+    delete obj[key];
+    return val;
+  };
+  exports.last = function(array, back) {
+    return array[array.length - (back || 0) - 1];
+  };
+}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/5f3fbff2/bin/node_modules/coffee-script/lib/index.js
----------------------------------------------------------------------
diff --git a/bin/node_modules/coffee-script/lib/index.js b/bin/node_modules/coffee-script/lib/index.js
new file mode 100644
index 0000000..38f7c1e
--- /dev/null
+++ b/bin/node_modules/coffee-script/lib/index.js
@@ -0,0 +1,8 @@
+(function() {
+  var key, val, _ref;
+  _ref = require('./coffee-script');
+  for (key in _ref) {
+    val = _ref[key];
+    exports[key] = val;
+  }
+}).call(this);