You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2013/05/07 17:24:34 UTC

[29/51] [partial] [BlackBerry10] Added support for new platform

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/.gitignore
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/.gitignore b/lib/cordova-blackberry/blackberry10/.gitignore
new file mode 100644
index 0000000..f2802d1
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/.gitignore
@@ -0,0 +1,27 @@
+# OS X
+
+.DS_Store
+
+# Eclipse
+
+deliverables/
+.preprocessed/
+
+# Text Editor Tmp
+
+._*
+
+# Generated libraries
+
+build/
+dist/
+bin/node_modules
+bin/templates/project/lib
+example/
+node_modules/
+
+# OS X
+
+.DS_Store
+
+tags

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/.jshint
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/.jshint b/lib/cordova-blackberry/blackberry10/.jshint
new file mode 100644
index 0000000..9f5611b
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/.jshint
@@ -0,0 +1,3 @@
+{
+    "es5" : true
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/.jshintignore
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/.jshintignore b/lib/cordova-blackberry/blackberry10/.jshintignore
new file mode 100644
index 0000000..6bb2b92
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/.jshintignore
@@ -0,0 +1 @@
+bin/test/cordova/unit/params-bad.json

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/.npmignore
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/.npmignore b/lib/cordova-blackberry/blackberry10/.npmignore
new file mode 100644
index 0000000..db4145c
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/.npmignore
@@ -0,0 +1,2 @@
+.gitignore
+.gitkeep

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/Jakefile
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/Jakefile b/lib/cordova-blackberry/blackberry10/Jakefile
new file mode 100644
index 0000000..81b2f6f
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/Jakefile
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF
+ * or more contributor license agreements.  See th
+ * distributed with this work for additional infor
+ * regarding copyright ownership.  The ASF license
+ * to you under the Apache License, Version 2.0 (t
+ * "License"); you may not use this file except in
+ * with the License.  You may obtain a copy of the
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to
+ * software distributed under the License is distr
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ * KIND, either express or implied.  See the Licen
+ * specific language governing permissions and lim
+ * under the License.
+ */
+
+var DESC_NEW_LINE = "\n\t\t      #";
+
+var util         = require('util'),
+    fs           = require('fs'),
+    childProcess = require('child_process'),
+    path         = require("path"),
+    rexp_minified = new RegExp("\\.min\\.js$"),
+    rexp_src = new RegExp('\\.js$');
+
+// HELPERS
+// Iterates over a directory
+function forEachFile(root, cbFile, cbDone) {
+    var count = 0;
+
+    function scan(name) {
+        ++count;
+
+        fs.stat(name, function (err, stats) {
+            if (err) cbFile(err);
+
+            if (stats.isDirectory()) {
+                fs.readdir(name, function (err, files) {
+                    if (err) cbFile(err);
+
+                    files.forEach(function (file) {
+                        scan(path.join(name, file));
+                    });
+                    done();
+                });
+            } else if (stats.isFile()) {
+                cbFile(null, name, stats, done);
+            } else {
+                done();
+            }
+        });
+    }
+
+    function done() {
+        --count;
+        if (count === 0 && cbDone) cbDone();
+    }
+
+    scan(root);
+}
+
+desc("runs test");
+task('default', ['hint','test'], function () {});
+
+desc("run all tests in node - jake test [path]");
+task('test', [], function () {
+    require('./scripts/test')(null, process.argv.length >= 4 ? process.argv[3] : null);
+});
+
+desc('check sources with JSHint');
+task('hint', ['complainwhitespace'], function () {
+    var knownWarnings = [
+        "Redefinition of 'FileReader'",
+        "Redefinition of 'require'",
+        "Read only",
+        "Redefinition of 'console'"
+    ];
+    var filterKnownWarnings = function(el, index, array) {
+        var wut = true;
+        // filter out the known warnings listed out above
+        knownWarnings.forEach(function(e) {
+            wut = wut && (el.indexOf(e) == -1);
+        });
+        wut = wut && (!el.match(/\d+ errors/));
+        return wut;
+    };
+
+    childProcess.exec("jshint framework/lib bin/lib bin/test bin/templates/project/cordova bin/templates/project/project.json --config .jshint --extra-ext .json",function(err,stdout,stderr) {
+        var exs = stdout.split('\n');
+        console.log(exs.filter(filterKnownWarnings).join('\n'));
+        complete();
+    });
+}, true);
+
+var complainedAboutWhitespace = false
+
+desc('complain about what fixwhitespace would fix');
+task('complainwhitespace', function() {
+    processWhiteSpace(function(file, newSource) {
+        if (!complainedAboutWhitespace) {
+            console.log("files with whitespace issues: (to fix: `jake fixwhitespace`)")
+            complainedAboutWhitespace = true
+        }
+
+        console.log("   " + file)
+    })
+}, true);
+
+desc('converts tabs to four spaces, eliminates trailing white space, converts newlines to proper form - enforcing style guide ftw!');
+task('fixwhitespace', function() {
+    processWhiteSpace(function(file, newSource) {
+        if (!complainedAboutWhitespace) {
+            console.log("fixed whitespace issues in:")
+            complainedAboutWhitespace = true
+        }
+
+        fs.writeFileSync(file, newSource, 'utf8');
+        console.log("   " + file)
+    })
+}, true);
+
+function processWhiteSpace(processor) {
+    forEachFile('framework', function(err, file, stats, cbDone) {
+        //if (err) throw err;
+        if (rexp_minified.test(file) || !rexp_src.test(file)) {
+            cbDone();
+        } else {
+            var origsrc = src = fs.readFileSync(file, 'utf8');
+
+            // tabs -> four spaces
+            if (src.indexOf('\t') >= 0) {
+                src = src.split('\t').join('    ');
+            }
+
+            // eliminate trailing white space
+            src = src.replace(/ +\n/g, '\n');
+
+            if (origsrc !== src) {
+                // write it out yo
+                processor(file, src);
+            }
+            cbDone();
+        }
+    }, complete);
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/LICENSE
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/LICENSE b/lib/cordova-blackberry/blackberry10/LICENSE
new file mode 100644
index 0000000..ee6a935
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/LICENSE
@@ -0,0 +1,268 @@
+
+                               Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+For the template/project/lib/ant-contrib/ant-contrib-1.0b3.jar component:
+
+   The Apache Software License, Version 1.1
+
+   Copyright (c) 2001-2003 Ant-Contrib project.  All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in
+      the documentation and/or other materials provided with the
+      distribution.
+
+   3. The end-user documentation included with the redistribution, if
+      any, must include the following acknowlegement:
+         "This product includes software developed by the
+          Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
+      Alternately, this acknowlegement may appear in the software itself,
+      if and wherever such third-party acknowlegements normally appear.
+
+   4. The name Ant-Contrib must not be used to endorse or promote products
+      derived from this software without prior written permission. For
+      written permission, please contact
+      ant-contrib-developers@lists.sourceforge.net.
+
+   5. Products derived from this software may not be called "Ant-Contrib"
+      nor may "Ant-Contrib" appear in their names without prior written
+      permission of the Ant-Contrib project.
+
+   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+   DISCLAIMED.  IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+   ====================================================================
+
+For the template/project/www/json2.js component:
+
+    http://www.JSON.org/json2.js
+    2010-03-20
+
+    Public Domain.
+
+    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+    See http://www.JSON.org/js.html
+
+
+    This code should be minified before deployment.
+    See http://javascript.crockford.com/jsmin.html
+
+    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+    NOT CONTROL.

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/NOTICE
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/NOTICE b/lib/cordova-blackberry/blackberry10/NOTICE
new file mode 100644
index 0000000..23360ce
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/NOTICE
@@ -0,0 +1,8 @@
+Apache Cordova
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org)
+
+This product includes software developed by
+Ant-Contrib project (http://sourceforge.net/projects/ant-contrib).

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/README.md
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/README.md b/lib/cordova-blackberry/blackberry10/README.md
new file mode 100644
index 0000000..8aaf204
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/README.md
@@ -0,0 +1,7 @@
+Cordova BlackBerry
+
+This repo contains cordova projects for the BlackBerry platforms:
+
+blackberry - BBOS 5+ and Tablet OS
+
+blackberry10 - BB10

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/VERSION
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/VERSION b/lib/cordova-blackberry/blackberry10/VERSION
new file mode 100644
index 0000000..edf28ac
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/VERSION
@@ -0,0 +1 @@
+2.4.0rc1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/check_reqs
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/check_reqs b/lib/cordova-blackberry/blackberry10/bin/check_reqs
new file mode 100755
index 0000000..9a8e9ee
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/check_reqs
@@ -0,0 +1,28 @@
+#!/usr/bin/env node
+
+/**
+ * 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.
+ */
+
+var qnxHost = process.env.QNX_HOST;
+
+if (typeof qnxHost !== "undefined" && typeof process.env.QNX_TARGET !== "undefined" && process.env.PATH.indexOf(qnxHost) !== -1) {
+    process.exit(0);
+} else {
+    process.exit(-1);
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/check_reqs.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/check_reqs.bat b/lib/cordova-blackberry/blackberry10/bin/check_reqs.bat
new file mode 100755
index 0000000..9c8986e
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/check_reqs.bat
@@ -0,0 +1,21 @@
+@ECHO OFF
+goto comment
+       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.
+:comment
+
+@node.exe %~dp0\check_reqs

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/create
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/create b/lib/cordova-blackberry/blackberry10/bin/create
new file mode 100755
index 0000000..87ce4c3
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/create
@@ -0,0 +1,25 @@
+#! /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/blackberry project
+#
+# USAGE
+#   ./create [path package appname]
+#
+#!/bin/sh
+node $( dirname "$0" )"/create.js" "$@"

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/create.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/create.bat b/lib/cordova-blackberry/blackberry10/bin/create.bat
new file mode 100644
index 0000000..7b15594
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/create.bat
@@ -0,0 +1,21 @@
+@ECHO OFF
+goto comment
+       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.
+:comment
+
+node.exe %~dp0\create.js %*

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/create.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/create.js b/lib/cordova-blackberry/blackberry10/bin/create.js
new file mode 100644
index 0000000..1253dad
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/create.js
@@ -0,0 +1,168 @@
+/*
+ * 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/blackberry project
+ *
+ * USAGE
+ *  ./create [path package appname]
+ */
+
+var build,
+    path = require("path"),
+    fs = require("fs"),
+    wrench = require("wrench"),
+    jWorkflow = require("jWorkflow"),
+    utils = require(path.join(__dirname, 'lib/utils')),
+    version = getVersion(),
+    project_path = process.argv[2],
+    app_id = process.argv[3],
+    bar_name = process.argv[4],
+    template_project_dir = path.join(__dirname, "templates", "project"),
+    modules_project_dir = path.join(__dirname, "..", "node_modules"),
+    framework_project_dir = path.join(__dirname, "..", "framework"),
+    build_dir = path.join(__dirname, "build"),
+    update_dir = path.join(project_path, "lib", "cordova." + version),
+    js_src = path.join(__dirname, "..", "javascript"),
+    js_path = "javascript",
+    js_basename = "cordova-" + version + ".js";
+
+    function getVersion() {
+        var version = fs.readFileSync(__dirname + "/../VERSION");
+        if (version) {
+            return version.toString();
+        }
+    }
+
+    function validate() {
+        if (!project_path) {
+            throw "You must give a project PATH";
+        }
+        if (fs.existsSync(project_path)) {
+            throw "The project path must be an empty directory";
+        }
+        if (!validPackageName(app_id)) {
+            throw "App ID must be sequence of alpha-numeric (optionally seperated by '.') characters, no longer than 50 characters";
+        }
+        if (!validBarName(bar_name)) {
+            throw "BAR filename can only contain alpha-numeric, '.', '-' and '_' characters";
+        }
+    }
+
+    function validPackageName(packageName) {
+        var domainRegex = /^[a-zA-Z]([a-zA-Z0-9])*(\.[a-zA-Z]([a-zA-Z0-9])*)*$/;
+        if (typeof packageName !== "undefined") {
+            if ((packageName.length > 50) || !domainRegex.test(packageName)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    function validBarName(barName) {
+        var barNameRegex = /^[a-zA-Z0-9._-]+$/;
+        return (typeof barName === "undefined") || barNameRegex.test(barName);
+    }
+
+    function clean() {
+        if (fs.existsSync(build_dir)) {
+            wrench.rmdirSyncRecursive(build_dir);
+        }
+    }
+
+    function copyJavascript() {
+        wrench.mkdirSyncRecursive(build_dir + "/" + js_path, 0777);
+        utils.copyFile(path.join(js_src, "cordova.blackberry10.js"), path.join(build_dir, js_path));
+
+        //rename copied cordova.blackberry10.js file
+        fs.renameSync(path.join(build_dir, js_path, "cordova.blackberry10.js"), path.join(build_dir, js_path, js_basename));
+    }
+
+    function copyFilesToProject() {
+        // create project using template directory
+        wrench.mkdirSyncRecursive(project_path, 0777);
+        wrench.copyDirSyncRecursive(template_project_dir, project_path);
+
+        // change file permission for cordova scripts because ant copy doesn't preserve file permissions
+        wrench.chmodSyncRecursive(project_path + "/cordova", 0700);
+
+        //copy cordova-*version*.js to www
+        utils.copyFile(path.join(build_dir, js_path, js_basename), path.join(project_path, "www"));
+
+        //copy node modules to cordova build directory
+        wrench.mkdirSyncRecursive(project_path + "/cordova/node_modules", 0777);
+        wrench.copyDirSyncRecursive(modules_project_dir, path.join(project_path, "cordova", "node_modules"));
+        fs.chmodSync(project_path + "/cordova/node_modules/plugman/plugman.js", 0755);
+
+        //copy framework
+        wrench.copyDirSyncRecursive(framework_project_dir, path.join(project_path, "cordova", "framework"));
+
+        // save release
+        wrench.mkdirSyncRecursive(update_dir, 0777);
+        wrench.copyDirSyncRecursive(build_dir, update_dir);
+    }
+
+    function updateProject() {
+        var projectJson,
+            xmlString,
+            configXMLPath = path.resolve(project_path + "/www/config.xml");
+
+        if (typeof app_id !== "undefined") {
+            xmlString = fs.readFileSync(configXMLPath, "utf-8");
+            fs.writeFileSync(configXMLPath, xmlString.replace("default.app.id", app_id), "utf-8");
+        }
+
+        if (typeof bar_name !== "undefined") {
+            projectJson = require(path.resolve(project_path + "/project.json"));
+            projectJson.barName = bar_name;
+            fs.writeFileSync(path.join(project_path, "project.json"), JSON.stringify(projectJson, null, 4) + "\n", "utf-8");
+        }
+    }
+
+    function done(error) {
+        if (error) {
+            console.log("Project creation failed!\n" + "Error: " + error);
+            process.exit(1);
+        }
+        else {
+            process.exit();
+        }
+    }
+
+    if ( process.argv[2] === "-h" || process.argv[2] === "--help" ) {
+        console.log("\nUsage: create <project path> [package name [BAR filename]] \n");
+        console.log("Options: \n");
+        console.log("   -h, --help      output usage information \n");
+    } else {
+        try {
+            build = jWorkflow.order(validate)
+                .andThen(clean)
+                .andThen(copyJavascript)
+                .andThen(copyFilesToProject)
+                .andThen(updateProject)
+                .andThen(clean);
+
+            build.start(function (error) {
+                done(error);
+            });
+        } catch (ex) {
+            console.log(ex);
+        }
+    }
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/lib/localize.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/lib/localize.js b/lib/cordova-blackberry/blackberry10/bin/lib/localize.js
new file mode 100644
index 0000000..66bddfa
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/lib/localize.js
@@ -0,0 +1,26 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var Localize = require("localize"),
+    loc = new Localize({
+        "SOME_WARNING": {
+            "en": "You have disabled all web security in this WebWorks application"
+        }
+    }, "", ""); // TODO maybe a bug in localize, must set default locale to "" in order get it to work
+
+loc.setLocale("en");
+
+module.exports = loc;

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/lib/utils.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/lib/utils.js b/lib/cordova-blackberry/blackberry10/bin/lib/utils.js
new file mode 100644
index 0000000..88dc619
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/lib/utils.js
@@ -0,0 +1,167 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var fs = require('fs'),
+    path = require('path'),
+    wrench = require('wrench'),
+    localize = require("./localize"),
+    os = require('os'),
+    _self;
+
+function swapBytes(buffer) {
+    var l = buffer.length,
+        i,
+        a;
+
+    if (l % 2 === 0x01) {
+        throw localize.translate("EXCEPTION_BUFFER_ERROR");
+    }
+
+    for (i = 0; i < l; i += 2) {
+        a = buffer[i];
+        buffer[i] = buffer[i + 1];
+        buffer[i + 1] = a;
+    }
+
+    return buffer;
+}
+
+_self = {
+    writeFile: function (fileLocation, fileName, fileData) {
+        //If directory does not exist, create it.
+        if (!fs.existsSync(fileLocation)) {
+            wrench.mkdirSyncRecursive(fileLocation, "0755");
+        }
+
+        fs.writeFile(path.join(fileLocation, fileName), fileData, function (err) {
+            if (err) throw err;
+        });
+    },
+
+    copyFile: function (srcFile, destDir, baseDir) {
+        var filename = path.basename(srcFile),
+            fileBuffer = fs.readFileSync(srcFile),
+            fileLocation;
+
+        //if a base directory was provided, determine
+        //folder structure from the relative path of the base folder
+        if (baseDir && srcFile.indexOf(baseDir) === 0) {
+            fileLocation = srcFile.replace(baseDir, destDir);
+            wrench.mkdirSyncRecursive(path.dirname(fileLocation), "0755");
+            fs.writeFileSync(fileLocation, fileBuffer);
+        } else {
+            if (!fs.existsSync(destDir)) {
+                wrench.mkdirSyncRecursive(destDir, "0755");
+            }
+
+            fs.writeFileSync(path.join(destDir, filename), fileBuffer);
+        }
+    },
+
+    listFiles: function (directory, filter) {
+        var files = wrench.readdirSyncRecursive(directory),
+            filteredFiles = [];
+
+        files.forEach(function (file) {
+            //On mac wrench.readdirSyncRecursive does not return absolute paths, so resolve one.
+            file = path.resolve(directory, file);
+
+            if (filter(file)) {
+                filteredFiles.push(file);
+            }
+        });
+
+        return filteredFiles;
+    },
+
+    isWindows: function () {
+        return os.type().toLowerCase().indexOf("windows") >= 0;
+    },
+
+    isArray: function (obj) {
+        return obj.constructor.toString().indexOf("Array") !== -1;
+    },
+
+    isEmpty : function (obj) {
+        for (var prop in obj) {
+            if (obj.hasOwnProperty(prop))
+                return false;
+        }
+        return true;
+    },
+
+    toBoolean: function (myString, defaultVal) {
+        // if defaultVal is not passed, default value is undefined
+        return myString === "true" ? true : myString === "false" ? false : defaultVal;
+    },
+
+    parseUri : function (str) {
+        var i, uri = {},
+            key = [ "source", "scheme", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor" ],
+            matcher = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(str);
+
+        for (i = key.length - 1; i >= 0; i--) {
+            uri[key[i]] = matcher[i] || "";
+        }
+
+        return uri;
+    },
+
+    // uri - output from parseUri
+    isAbsoluteURI : function (uri) {
+        if (uri && uri.source) {
+            return uri.relative !== uri.source;
+        }
+
+        return false;
+    },
+
+    isLocalURI : function (uri) {
+        return uri && uri.scheme && uri.scheme.toLowerCase() === "local";
+    },
+
+    // Convert node.js Buffer data (encoded) to String
+    bufferToString : function (data) {
+        var s = "";
+        if (Buffer.isBuffer(data)) {
+            if (data.length >= 2 && data[0] === 0xFF && data[1] === 0xFE) {
+                s = data.toString("ucs2", 2);
+            } else if (data.length >= 2 && data[0] === 0xFE && data[1] === 0xFF) {
+                swapBytes(data);
+                s = data.toString("ucs2", 2);
+            } else if (data.length >= 3 && data[0] === 0xEF && data[1] === 0xBB && data[2] === 0xBF) {
+                s = data.toString("utf8", 3);
+            } else {
+                s = data.toString("ascii");
+            }
+        }
+
+        return s;
+    },
+
+    // Wrap object property in an Array if the property is defined and it is not an Array
+    wrapPropertyInArray : function (obj, property) {
+        if (obj && obj[property] && !(obj[property] instanceof Array)) {
+            obj[property] = [ obj[property] ];
+        }
+    },
+
+    loadModule: function (path) {
+        return require(path);
+    }
+};
+
+module.exports = _self;

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build
new file mode 100755
index 0000000..e0207e4
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build
@@ -0,0 +1,6 @@
+#cd into project dir
+cd $( dirname "$0")/../
+
+#package app
+node ./cordova/lib/build "$@"
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build.bat b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build.bat
new file mode 100755
index 0000000..571bae6
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/build.bat
@@ -0,0 +1,8 @@
+@ECHO OFF
+
+REM cd into project dir
+cd %~dp0\..\
+
+REM package app
+@node.exe ./cordova/lib/build %*
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean
new file mode 100755
index 0000000..0d29bd7
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean
@@ -0,0 +1,4 @@
+#cd into project dir
+cd $( dirname "$0")/../
+
+node ./cordova/lib/clean

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean.bat b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean.bat
new file mode 100644
index 0000000..eb5738c
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/clean.bat
@@ -0,0 +1,6 @@
+@ECHO OFF
+
+REM cd into project dir
+cd %~dp0\..\
+
+@node.exe ./cordova/lib/clean

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-builder.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-builder.js b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-builder.js
new file mode 100644
index 0000000..e1be25c
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-builder.js
@@ -0,0 +1,100 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var jWorkflow = require("jWorkflow"),
+    wrench = require("wrench"),
+    nativePkgr = require("./native-packager"),
+    fileManager = require("./file-manager"),
+    localize = require("./localize"),
+    logger = require("./logger"),
+    signingHelper = require("./signing-helper"),
+    targetIdx = 0;
+
+function buildTarget(previous, baton) {
+    baton.take();
+
+    var target = this.session.targets[targetIdx++],
+        session = this.session,
+        config = this.config;
+
+    //Create output folder
+    wrench.mkdirSyncRecursive(session.outputDir + "/" + target);
+
+    //Copy target dependent files
+    fileManager.copyWWE(this.session, target);
+    fileManager.copyWebplatform(this.session, target);
+
+    if (config.packageCordovaJs) {
+        //Package cordova.js to chrome folder
+        fileManager.copyWebworks(this.session);
+    }
+
+    fileManager.copyJnextDependencies(this.session);
+    fileManager.copyExtensions(this.session, target);
+
+    //Generate frameworkModules.js (this needs to be done AFTER all files have been copied)
+    fileManager.generateFrameworkModulesJS(session);
+
+    //Call native-packager module for target
+    nativePkgr.exec(session, target, config, function (code) {
+        if (code !== 0) {
+            logger.error(localize.translate("EXCEPTION_NATIVEPACKAGER"));
+            baton.pass(code);
+        } else {
+            if (target === "device" && session.isSigningRequired(config)) {
+                signingHelper.execSigner(session, target, function (code) {
+                    baton.pass(code);
+                });
+            } else {
+                baton.pass(code);
+            }
+        }
+    });
+}
+
+function buildWorkflow(session, context) {
+    if (session.targets && session.targets.length > 0) {
+        var order;
+
+        session.targets.forEach(function (target, idx) {
+            if (idx === 0) {
+                order = jWorkflow.order(buildTarget, context);
+            } else {
+                order = order.andThen(buildTarget, context);
+            }
+        });
+
+        return order;
+    } else {
+        logger.debug("NOTHING TO BUILD, NO TARGETS");
+    }
+}
+
+module.exports = {
+    build: function (session, config, callback) {
+        var context = {
+                session: session,
+                config: config,
+            },
+            workflow = buildWorkflow(session, context);
+
+        if (workflow) {
+            workflow.start({
+                "callback": callback
+            });
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-conf.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-conf.js b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-conf.js
new file mode 100644
index 0000000..857875b
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bar-conf.js
@@ -0,0 +1,27 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var self = {};
+
+self.ROOT = "";
+self.CHROME = self.ROOT + "/chrome";
+self.LIB = self.CHROME + "/lib";
+self.EXT = self.CHROME + "/plugin";
+self.UI = self.ROOT + "/ui-resources";
+self.PLUGINS = self.ROOT + "/plugins";
+self.JNEXT_PLUGINS = self.ROOT + "/plugins/jnext";
+
+module.exports = self;

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bbwpignore.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bbwpignore.js b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bbwpignore.js
new file mode 100755
index 0000000..29c6399
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/bbwpignore.js
@@ -0,0 +1,129 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var fs = require("fs"),
+    path = require("path"),
+    BBWPignore;
+
+function getDirectory(file) {
+    if (file.match("/$")) {
+        return file;
+    } else if (file.indexOf("/") === -1) {
+        return "";
+    } else {
+        return file.substring(0, file.lastIndexOf("/"));
+    }
+}
+
+function trim(str) {
+    return str.replace(/^\s+|\s+$/g, "");
+}
+
+BBWPignore = function (bbwpIgnoreFile, filesToMatch) {
+    var comments = [],
+        directories = [],
+        wildcardEntries = [],
+        files = [],
+        split,
+        matched = [],
+        i,
+        temparr,
+        tempFiles = [];
+    temparr = fs.readFileSync(bbwpIgnoreFile, "utf-8").split('\n');
+
+    //switch all the paths to relative, so if someone has passed absolute paths convert them to relative to .bbwpignore
+    filesToMatch.forEach(function (file) {
+        if (file === path.resolve(file)) { //if path is absolute
+            tempFiles.push(path.relative(path.dirname(bbwpIgnoreFile), file));
+        } else {
+            tempFiles.push(file);
+        }
+    });
+    filesToMatch = tempFiles;
+
+    //run through all the patterns in the bbwpignore and put them in appropriate arrays
+    for (i = 0; i < temparr.length; i++) {
+        temparr[i] = trim(temparr[i]);
+        if (temparr[i] !== "") {
+            if (temparr[i].match("^#")) {
+                comments.push(temparr[i]);
+            } else if (temparr[i].match("^/") && temparr[i].match("/$")) {
+                directories.push(temparr[i]);
+            } else if (temparr[i].indexOf("*") !== -1) {
+                split = temparr[i].split("/");
+                if (split[split.length - 1].indexOf("*") !== -1) { // only wildcards in the file name are supported, not in directory names
+                    wildcardEntries.push(temparr[i]);
+                } else {
+                    files.push(temparr[i]);
+                }
+            } else {
+                files.push(temparr[i]);
+            }
+        }
+    }
+
+    //run through all the files and check it against each of the patterns collected earlier
+    filesToMatch.forEach(function (fileToMatch) {
+        var directory,
+            dirOrig = getDirectory(fileToMatch),
+            isMatch = false;
+        //match directories
+        directory = "/" + dirOrig + "/";
+        if (directories.indexOf(directory) !== -1) {
+            matched.push(fileToMatch);
+            //add the directory to the list as well but only check
+            if (matched.indexOf("/" + dirOrig) === -1) {
+                matched.push("/" + dirOrig);
+            }
+            isMatch = true;
+        } else {
+            //handle special case when match patterns begin with /
+            //match wildCards
+            wildcardEntries.forEach(function (wildcard) {
+                if (wildcard.match("^/")) { // special case looking for exact match
+                    wildcard = "^" + wildcard.replace("*", "[^\/]*");
+                    if (("/" + fileToMatch).match(wildcard)) {
+                        matched.push(fileToMatch);
+                        isMatch = true;
+                    }
+                } else {
+                    wildcard = wildcard.replace("*", "[^\/]*");
+                    if (fileToMatch.match(wildcard)) {
+                        matched.push(fileToMatch);
+                        isMatch = true;
+                    }
+                }
+            });
+            if (!isMatch) { //must be a file
+                files.forEach(function (file) {
+                    if (file.match("^/")) { // special case looking for exact match
+                        if (file === ("/" + fileToMatch)) {
+                            matched.push(fileToMatch);
+                            isMatch = true;
+                        }
+                    } else if (fileToMatch.match(file)) {
+                        matched.push(fileToMatch);
+                        isMatch = true;
+                    }
+                });
+
+            }
+        }
+    });
+    this.matchedFiles = matched;
+};
+
+module.exports = BBWPignore;

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/build
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/build b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/build
new file mode 100644
index 0000000..81e7dd6
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/build
@@ -0,0 +1,173 @@
+#!/usr/bin/env node
+
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var path = require("path"),
+    command = require("commander"),
+    jWorkflow = require("jWorkflow"),
+    localize = require("./localize"),
+    logger = require("./logger"),
+    projectProperties = require("../../project.json"),
+    debugTokenHelper = require("./debugtoken-helper"),
+    bbwpArgv = [
+        process.argv[0],
+        process.argv[1],
+        "./www",
+        "-o",
+        "./build"
+    ],
+    built = false,
+    debugtoken = false;
+
+function getTarget() {
+    return typeof command.args[0] === "string" ? command.args[0] : undefined;
+}
+
+function copyArgIfExists(arg) {
+    if (command[arg]) {
+        bbwpArgv.push("--" + arg);
+        bbwpArgv.push(command[arg]);
+    }
+}
+
+function createDebugtoken(previous, baton) {
+    baton.take();
+    logger.info(localize.translate("PROGRESS_WILL_CREATE_DEBUG_TOKEN"));
+    debugTokenHelper.createToken(projectProperties, getTarget(), function (code) {
+        if (code === 0) {
+            debugtoken = true;
+        }
+
+        baton.pass();
+    });
+}
+
+function deployDebugToken(previous, baton) {
+    baton.take();
+
+    // If in debug build and debug token was created, deploy the debug token and wait until the deployment is finished
+    if (debugtoken) {
+        logger.info(localize.translate("PROGRESS_WILL_DEPLOY_DEBUG_TOKEN"));
+        debugTokenHelper.deployToken(projectProperties, getTarget(), function () {
+            baton.pass();
+        });
+    } else {
+        baton.pass();
+    }
+}
+
+function doDebugBuild() {
+    built = true;
+
+    //build in debug mode by default
+    bbwpArgv.push("-d");
+
+    // In debug build, it needs to create debug token first
+    jWorkflow.order(createDebugtoken)
+             .andThen(deployDebugToken)
+             .andThen(build)
+             .start();
+}
+
+function doReleaseBuild() {
+    built = true;
+
+    //Note: Packager refers to signing password as "password" not "keystorepass"
+    if (command["keystorepass"]) {
+        bbwpArgv.push("--password");
+        bbwpArgv.push(command["keystorepass"]);
+    } else if (projectProperties.keystorepass) {
+        bbwpArgv.push("--password");
+        bbwpArgv.push( projectProperties.keystorepass);
+    } else {
+        throw "No signing password provided. Please use --keystorepass via command-line or enter a value for keystorepass in project.json";
+    }
+
+    copyArgIfExists("buildId");
+
+    build();
+}
+
+function build() {
+    copyArgIfExists("params");
+    copyArgIfExists("loglevel");
+
+    //Overrite process.argv, before calling packager
+    process.argv = bbwpArgv;
+
+    //Delete cached commander object. It will conflict with the packagers commander
+    delete require.cache[require.resolve("commander")];
+    delete require.cache[require.resolve("commander/lib/commander")];
+
+    //Package app. If successfull call run
+    require("./packager").start(run);
+}
+
+function run() {
+    var target = getTarget();
+
+    //Overrite process.argv, before calling run
+    process.argv = [
+        process.argv[0],
+        process.argv[1],
+    ];
+
+    if (target) {
+        process.argv.push(target);
+    }
+
+    //deploy app
+    require("./run");
+}
+
+command
+    .usage('command [<target>] [-k | --keystorepass] [-b | --buildId <number>] [-p | --params <json>] [-ll | --loglevel <level>]')
+    .option('-k, --keystorepass <password>', 'Signing key password')
+    .option('-b, --buildId <num>', 'Specifies the build number for signing (typically incremented from previous signing).')
+    .option('-p, --params <params JSON file>', 'Specifies additional parameters to pass to downstream tools.')
+    .option('-ll, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)');
+
+command
+    .command('release')
+    .usage('[<target>] [-k | --keystorepass] [-b | --buildId <number>] [-p | --params <json>] [-ll | --loglevel <level>]')
+    .description('    Build in release mode. This will sign the resulting bar.')
+    .option('-k, --keystorepass <password>', 'Signing key password')
+    .option('-b, --buildId <num>', 'Specifies the build number for signing (typically incremented from previous signing).')
+    .option('-p, --params <params JSON file>', 'Specifies additional parameters to pass to downstream tools.')
+    .option('-ll, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)')
+    .action(doReleaseBuild);
+
+command
+    .command('debug')
+    .usage('[<target>] [-p | --params <json>] [-ll | --loglevel <level>]')
+    .description('    Build in debug mode.')
+    .option('-p, --params <params JSON file>', 'Specifies additional parameters to pass to downstream tools.')
+    .option('-ll, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)')
+    .action(doDebugBuild);
+
+try {
+    command.parse(process.argv);
+
+    //if we get here and haven't built yet then no mode was provided [debug, release], default to debug mode
+    if (!built) {
+        doDebugBuild();
+    }
+} catch (e) {
+    console.log(e);
+    process.exit();
+}
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/clean
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/clean b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/clean
new file mode 100644
index 0000000..46391d3
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/clean
@@ -0,0 +1,24 @@
+#!/usr/bin/env node
+
+/*
+ *  Copyright 2013 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var wrench = require('wrench'),
+    path = require("path"),
+    buildPath = path.normalize(__dirname + "/../../build/");
+
+   wrench.rmdirSyncRecursive(buildPath, true);
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/cmdline.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/cmdline.js b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/cmdline.js
new file mode 100644
index 0000000..14eb172
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/cmdline.js
@@ -0,0 +1,67 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var command = require("commander"),
+    logger = require("./logger"),
+    localize = require("./localize");
+
+command
+    .version('1.0.0.0')
+    .usage('[drive:][path]archive [-s [dir]] [[ -g genpassword] [-buildId num]] [-o dir] [-d] [-p paramsjsonfile]')
+    .option('-s, --source [dir]', 'Save source. The default behaviour is to not save the source files. If dir is specified then creates dir\\src\\ directory structure. If no dir specified then the path of archive is assumed')
+    .option('-g, --password <password>', 'Signing key password')
+    .option('-buildId <num>', '[deprecated] Use --buildId.')
+    .option('-b, --buildId <num>', 'Specifies the build number for signing (typically incremented from previous signing).')
+    .option('-o, --output <dir>', 'Redirects output file location to dir. If both -o and dir are not specified then the path of archive is assumed')
+    .option('-d, --debug', 'Allows use of not signed build on device by utilizing debug token and enables Web Inspector.')
+    .option('-p, --params <params JSON file>', 'Specifies additional parameters to pass to downstream tools.')
+    .option('--appdesc <filepath>', 'Optionally specifies the path to the bar descriptor file (bar-descriptor.xml). For internal use only.')
+    .option('-v, --verbose', 'Turn on verbose messages')
+	.option('-ll, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)');
+
+function parseArgs(args) {
+    var option,
+        i;
+    if (!args[2]) {
+        //no args passed into [node bbwp.js], show the help information
+        args.push("-h");
+    }
+
+    //Handle deprecated option -buildId
+    for (i = 0; i < args.length; i++) {
+        if (args[i] === "-buildId") {
+            args[i] = "--buildId";
+        }
+    }
+    
+    command.parse(args);
+
+    //Check for any invalid command line args
+    for (i = 0; i < args.length; i++) {
+        //Remove leading dashes if any
+        option = args[i].substring(2);
+        if (args[i].indexOf("--") === 0 && !command[option]) {
+            throw localize.translate("EXCEPTION_CMDLINE_ARG_INVALID", args[i]);
+        }
+    }
+
+    return this;
+}
+
+module.exports = {
+    "commander": command,
+    "parse": parseArgs
+};

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6831bed4/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/conf.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/conf.js b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/conf.js
new file mode 100644
index 0000000..75c47a8
--- /dev/null
+++ b/lib/cordova-blackberry/blackberry10/bin/templates/project/cordova/lib/conf.js
@@ -0,0 +1,45 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var path = require("path"),
+    fs = require("fs");
+
+function getToolsDir() {
+    if (process.env && process.env.QNX_HOST) {
+        var bbndkDir = path.join(process.env.QNX_HOST, "usr");
+        if (fs.existsSync(bbndkDir)) {
+            //BBNDK exists on path, use its tools
+            return bbndkDir;
+        }
+    }
+}
+
+module.exports = {
+    ROOT: path.normalize(__dirname + "/../framework"),
+    PROJECT_ROOT: path.normalize(__dirname + "/../../"),
+    BIN: path.normalize(__dirname + "/../framework/bin"),
+    LIB: path.normalize(__dirname + "/../framework/lib"),
+    EXT: path.normalize(__dirname + "/../../plugins"),
+    UI: path.normalize(__dirname + "/../framework/ui-resources"),
+    DEPENDENCIES: path.normalize(__dirname + "/../framework/dependencies"),
+    DEPENDENCIES_BOOTSTRAP: path.normalize(__dirname + "/../framework/bootstrap"),
+    DEPENDENCIES_TOOLS: getToolsDir(),
+    DEPENDENCIES_WWE: path.normalize(__dirname + "/../dependencies/%s-wwe"),
+    DEBUG_TOKEN: path.normalize(__dirname + "/../debugtoken.bar"),
+    DEFAULT_ICON: path.normalize(__dirname + "/../default-icon.png"),
+    BAR_DESCRIPTOR: "bar-descriptor.xml",
+    BBWP_IGNORE_FILENAME: ".bbwpignore"
+};