You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/08/20 20:12:03 UTC

[11/11] git commit: CB-7341 Port tooling/platform scripts from WSH to NodeJS

CB-7341 Port tooling/platform scripts from WSH to NodeJS


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/c2c2e564
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/c2c2e564
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/c2c2e564

Branch: refs/heads/master
Commit: c2c2e564ba32bdb3599b31d36e705acc9d015c3b
Parents: 0cd48c8
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Wed Aug 20 14:00:56 2014 +0400
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Wed Aug 20 16:04:58 2014 +0400

----------------------------------------------------------------------
 .gitignore                                      |   11 -
 wp8/bin/check_reqs                              |   54 +-
 wp8/bin/check_reqs.bat                          |    7 +-
 wp8/bin/check_reqs.js                           |   76 -
 wp8/bin/create                                  |   38 +
 wp8/bin/create.bat                              |    7 +-
 wp8/bin/create.js                               |  287 ---
 wp8/bin/createTemplates.bat                     |    1 -
 wp8/bin/lib/check_reqs.js                       |   35 +
 wp8/bin/lib/create.js                           |  123 ++
 wp8/bin/lib/update.js                           |   68 +
 wp8/bin/update                                  |   34 +
 wp8/bin/update.bat                              |    9 +-
 wp8/bin/update.js                               |  353 ----
 wp8/node_modules/.bin/nopt                      |   15 +
 wp8/node_modules/.bin/nopt.cmd                  |    5 +
 wp8/node_modules/.bin/shjs                      |   15 +
 wp8/node_modules/.bin/shjs.cmd                  |    5 +
 wp8/node_modules/node-uuid/.npmignore           |    2 +
 wp8/node_modules/node-uuid/LICENSE.md           |    2 +
 wp8/node_modules/node-uuid/README.md            |  207 ++
 wp8/node_modules/node-uuid/benchmark/README.md  |   53 +
 wp8/node_modules/node-uuid/benchmark/bench.gnu  |  174 ++
 wp8/node_modules/node-uuid/benchmark/bench.sh   |   34 +
 .../node-uuid/benchmark/benchmark-native.c      |   34 +
 .../node-uuid/benchmark/benchmark.js            |   84 +
 wp8/node_modules/node-uuid/component.json       |   18 +
 wp8/node_modules/node-uuid/package.json         |   36 +
 wp8/node_modules/node-uuid/test/compare_v1.js   |   63 +
 wp8/node_modules/node-uuid/test/test.html       |   17 +
 wp8/node_modules/node-uuid/test/test.js         |  228 +++
 wp8/node_modules/node-uuid/uuid.js              |  245 +++
 wp8/node_modules/nopt/.npmignore                |    1 +
 wp8/node_modules/nopt/LICENSE                   |   23 +
 wp8/node_modules/nopt/README.md                 |  209 ++
 wp8/node_modules/nopt/examples/my-program.js    |   30 +
 wp8/node_modules/nopt/lib/nopt.js               |  414 ++++
 .../nopt/node_modules/abbrev/CONTRIBUTING.md    |    3 +
 .../nopt/node_modules/abbrev/LICENSE            |   23 +
 .../nopt/node_modules/abbrev/README.md          |   23 +
 .../nopt/node_modules/abbrev/abbrev.js          |   62 +
 .../nopt/node_modules/abbrev/package.json       |   29 +
 .../nopt/node_modules/abbrev/test.js            |   47 +
 wp8/node_modules/nopt/package.json              |   41 +
 wp8/node_modules/nopt/test/basic.js             |  251 +++
 wp8/node_modules/q/CONTRIBUTING.md              |   40 +
 wp8/node_modules/q/LICENSE                      |   18 +
 wp8/node_modules/q/README.md                    |  820 ++++++++
 .../q/benchmark/compare-with-callbacks.js       |   71 +
 wp8/node_modules/q/benchmark/scenarios.js       |   36 +
 wp8/node_modules/q/package.json                 |   93 +
 wp8/node_modules/q/q.js                         | 1904 ++++++++++++++++++
 wp8/node_modules/q/queue.js                     |   35 +
 wp8/node_modules/shelljs/.documentup.json       |    6 +
 wp8/node_modules/shelljs/.npmignore             |    1 +
 wp8/node_modules/shelljs/.travis.yml            |    5 +
 wp8/node_modules/shelljs/LICENSE                |   26 +
 wp8/node_modules/shelljs/README.md              |  513 +++++
 wp8/node_modules/shelljs/global.js              |    3 +
 wp8/node_modules/shelljs/jshint.json            |    4 +
 wp8/node_modules/shelljs/make.js                |   48 +
 wp8/node_modules/shelljs/package.json           |   46 +
 wp8/node_modules/shelljs/scripts/docs.js        |   15 +
 wp8/node_modules/shelljs/scripts/run-tests.js   |   50 +
 wp8/node_modules/shelljs/shell.js               | 1901 +++++++++++++++++
 wp8/node_modules/shelljs/test/.npmignore        |    2 +
 wp8/node_modules/shelljs/test/cat.js            |   57 +
 wp8/node_modules/shelljs/test/cd.js             |   64 +
 wp8/node_modules/shelljs/test/chmod.js          |   81 +
 wp8/node_modules/shelljs/test/config.js         |   50 +
 wp8/node_modules/shelljs/test/cp.js             |  143 ++
 wp8/node_modules/shelljs/test/dirs.js           |   37 +
 wp8/node_modules/shelljs/test/echo.js           |   50 +
 wp8/node_modules/shelljs/test/env.js            |   19 +
 wp8/node_modules/shelljs/test/exec.js           |  109 +
 wp8/node_modules/shelljs/test/find.js           |   56 +
 wp8/node_modules/shelljs/test/grep.js           |   59 +
 wp8/node_modules/shelljs/test/ls.js             |  202 ++
 wp8/node_modules/shelljs/test/make.js           |   20 +
 wp8/node_modules/shelljs/test/mkdir.js          |   79 +
 wp8/node_modules/shelljs/test/mv.js             |  130 ++
 wp8/node_modules/shelljs/test/popd.js           |  118 ++
 wp8/node_modules/shelljs/test/pushd.js          |  228 +++
 wp8/node_modules/shelljs/test/pwd.js            |   28 +
 wp8/node_modules/shelljs/test/resources/a.txt   |   11 +
 .../test/resources/chmod/a/b/c/.npmignore       |    0
 .../test/resources/chmod/b/a/b/.npmignore       |    0
 .../test/resources/chmod/c/a/b/.npmignore       |    0
 .../shelljs/test/resources/chmod/file1          |    2 +
 wp8/node_modules/shelljs/test/resources/cp/a    |    1 +
 wp8/node_modules/shelljs/test/resources/cp/b    |    1 +
 .../shelljs/test/resources/cp/dir_a/z           |    1 +
 .../test/resources/cp/dir_b/dir_b_a/dir_b_a_a/z |    1 +
 .../test/resources/external/node_script.js      |    2 +
 wp8/node_modules/shelljs/test/resources/file1   |    1 +
 .../shelljs/test/resources/file1.js             |    1 +
 .../shelljs/test/resources/file1.txt            |    1 +
 wp8/node_modules/shelljs/test/resources/file2   |    1 +
 .../shelljs/test/resources/file2.js             |    1 +
 .../shelljs/test/resources/file2.txt            |    1 +
 .../shelljs/test/resources/find/.hidden         |    1 +
 wp8/node_modules/shelljs/test/resources/find/a  |    1 +
 wp8/node_modules/shelljs/test/resources/find/b  |    1 +
 .../shelljs/test/resources/find/dir1/a_dir1     |    1 +
 .../test/resources/find/dir1/dir11/a_dir11      |    1 +
 .../shelljs/test/resources/find/dir2/a_dir1     |    1 +
 .../shelljs/test/resources/issue44/main.js      |    1 +
 .../shelljs/test/resources/ls/.hidden_dir/nada  |    1 +
 .../shelljs/test/resources/ls/.hidden_file      |    1 +
 .../test/resources/ls/a_dir/.hidden_dir/nada    |    1 +
 .../shelljs/test/resources/ls/a_dir/b_dir/z     |    1 +
 .../shelljs/test/resources/ls/a_dir/nada        |    1 +
 .../shelljs/test/resources/ls/file1             |    1 +
 .../shelljs/test/resources/ls/file1.js          |    1 +
 .../shelljs/test/resources/ls/file2             |    1 +
 .../shelljs/test/resources/ls/file2.js          |    1 +
 .../filename(with)[chars$]^that.must+be-escaped |    1 +
 .../shelljs/test/resources/pushd/a/dummy        |    1 +
 .../shelljs/test/resources/pushd/b/c/dummy      |    1 +
 wp8/node_modules/shelljs/test/rm.js             |  183 ++
 wp8/node_modules/shelljs/test/sed.js            |   58 +
 wp8/node_modules/shelljs/test/tempdir.js        |   27 +
 wp8/node_modules/shelljs/test/test.js           |   91 +
 wp8/node_modules/shelljs/test/to.js             |   39 +
 wp8/node_modules/shelljs/test/which.js          |   38 +
 wp8/package.json                                |    6 +
 wp8/template/cordova/build                      |   34 +
 wp8/template/cordova/build.bat                  |    9 +-
 wp8/template/cordova/clean                      |   27 +
 wp8/template/cordova/clean.bat                  |    7 +-
 .../cordova/lib/CordovaDeploy/CordovaDeploy.sln |   38 -
 .../CordovaDeploy/CordovaDeploy.csproj          |   96 -
 .../lib/CordovaDeploy/CordovaDeploy/Program.cs  |  333 ---
 .../CordovaDeploy/Properties/AssemblyInfo.cs    |   50 -
 .../lib/CordovaDeploy/CordovaDeploy/app.config  |   21 -
 wp8/template/cordova/lib/MSBuildTools.js        |   73 +
 wp8/template/cordova/lib/build.js               |  333 +--
 wp8/template/cordova/lib/clean.js               |   82 +-
 wp8/template/cordova/lib/deploy.js              |  422 ----
 wp8/template/cordova/lib/device.js              |   54 +
 wp8/template/cordova/lib/install-device.bat     |    7 +-
 wp8/template/cordova/lib/install-emulator.bat   |    7 +-
 wp8/template/cordova/lib/list-devices.bat       |    3 +-
 .../cordova/lib/list-emulator-images.bat        |    3 +-
 .../cordova/lib/list-started-emulators.bat      |    1 -
 wp8/template/cordova/lib/log.js                 |   77 -
 wp8/template/cordova/lib/package.js             |   63 +
 wp8/template/cordova/lib/run.js                 |   88 +
 wp8/template/cordova/lib/start-emulator.bat     |    1 -
 wp8/template/cordova/lib/target-list.js         |  241 +--
 wp8/template/cordova/lib/utils.js               |  120 ++
 wp8/template/cordova/lib/win_os_version.js      |   23 +-
 wp8/template/cordova/lib/win_sdk_version.js     |   68 +-
 wp8/template/cordova/node_modules/.bin/nopt     |   15 +
 wp8/template/cordova/node_modules/.bin/nopt.cmd |    5 +
 wp8/template/cordova/node_modules/.bin/shjs     |   15 +
 wp8/template/cordova/node_modules/.bin/shjs.cmd |    5 +
 .../cordova/node_modules/nopt/.npmignore        |    1 +
 wp8/template/cordova/node_modules/nopt/LICENSE  |   23 +
 .../cordova/node_modules/nopt/README.md         |  209 ++
 .../node_modules/nopt/examples/my-program.js    |   30 +
 .../cordova/node_modules/nopt/lib/nopt.js       |  414 ++++
 .../nopt/node_modules/abbrev/CONTRIBUTING.md    |    3 +
 .../nopt/node_modules/abbrev/LICENSE            |   23 +
 .../nopt/node_modules/abbrev/README.md          |   23 +
 .../nopt/node_modules/abbrev/abbrev.js          |   62 +
 .../nopt/node_modules/abbrev/package.json       |   29 +
 .../nopt/node_modules/abbrev/test.js            |   47 +
 .../cordova/node_modules/nopt/package.json      |   41 +
 .../cordova/node_modules/nopt/test/basic.js     |  251 +++
 .../cordova/node_modules/q/CONTRIBUTING.md      |   40 +
 wp8/template/cordova/node_modules/q/LICENSE     |   18 +
 wp8/template/cordova/node_modules/q/README.md   |  820 ++++++++
 .../q/benchmark/compare-with-callbacks.js       |   71 +
 .../node_modules/q/benchmark/scenarios.js       |   36 +
 .../cordova/node_modules/q/package.json         |   93 +
 wp8/template/cordova/node_modules/q/q.js        | 1904 ++++++++++++++++++
 wp8/template/cordova/node_modules/q/queue.js    |   35 +
 .../node_modules/shelljs/.documentup.json       |    6 +
 .../cordova/node_modules/shelljs/.jshintrc      |    7 +
 .../cordova/node_modules/shelljs/.npmignore     |    2 +
 .../cordova/node_modules/shelljs/.travis.yml    |    5 +
 .../cordova/node_modules/shelljs/LICENSE        |   26 +
 .../cordova/node_modules/shelljs/README.md      |  569 ++++++
 .../cordova/node_modules/shelljs/global.js      |    3 +
 .../cordova/node_modules/shelljs/make.js        |   47 +
 .../cordova/node_modules/shelljs/package.json   |   47 +
 .../shelljs/scripts/generate-docs.js            |   21 +
 .../node_modules/shelljs/scripts/run-tests.js   |   50 +
 .../cordova/node_modules/shelljs/shell.js       |  157 ++
 .../cordova/node_modules/shelljs/src/cat.js     |   43 +
 .../cordova/node_modules/shelljs/src/cd.js      |   19 +
 .../cordova/node_modules/shelljs/src/chmod.js   |  208 ++
 .../cordova/node_modules/shelljs/src/common.js  |  203 ++
 .../cordova/node_modules/shelljs/src/cp.js      |  201 ++
 .../cordova/node_modules/shelljs/src/dirs.js    |  191 ++
 .../cordova/node_modules/shelljs/src/echo.js    |   20 +
 .../cordova/node_modules/shelljs/src/error.js   |   10 +
 .../cordova/node_modules/shelljs/src/exec.js    |  181 ++
 .../cordova/node_modules/shelljs/src/find.js    |   51 +
 .../cordova/node_modules/shelljs/src/grep.js    |   52 +
 .../cordova/node_modules/shelljs/src/ln.js      |   53 +
 .../cordova/node_modules/shelljs/src/ls.js      |  126 ++
 .../cordova/node_modules/shelljs/src/mkdir.js   |   68 +
 .../cordova/node_modules/shelljs/src/mv.js      |   80 +
 .../cordova/node_modules/shelljs/src/popd.js    |    1 +
 .../cordova/node_modules/shelljs/src/pushd.js   |    1 +
 .../cordova/node_modules/shelljs/src/pwd.js     |   11 +
 .../cordova/node_modules/shelljs/src/rm.js      |  145 ++
 .../cordova/node_modules/shelljs/src/sed.js     |   43 +
 .../cordova/node_modules/shelljs/src/tempdir.js |   56 +
 .../cordova/node_modules/shelljs/src/test.js    |   85 +
 .../cordova/node_modules/shelljs/src/to.js      |   29 +
 .../cordova/node_modules/shelljs/src/toEnd.js   |   29 +
 .../cordova/node_modules/shelljs/src/which.js   |   83 +
 wp8/template/cordova/run                        |   34 +
 wp8/template/cordova/run.bat                    |    7 +-
 wp8/template/cordova/win_os_version.bat         |    3 +-
 wp8/template/cordova/win_sdk_version.bat        |    3 +-
 219 files changed, 18171 insertions(+), 2448 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index f770a39..1bc763b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,8 +12,6 @@ Thumbs.db
 
 # Ignore template zip files
 *.zip
-
-
  
 # Other useful stuff
 *.bak
@@ -24,14 +22,5 @@ Thumbs.db
 
 *.DS_Store
 
-wp8/node_modules/
-
-
 #We want to allow some bin folders ...
 !wp8/bin/
-
-
-
-
-
- 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/check_reqs
----------------------------------------------------------------------
diff --git a/wp8/bin/check_reqs b/wp8/bin/check_reqs
index d1b9bc0..ab8b313 100755
--- a/wp8/bin/check_reqs
+++ b/wp8/bin/check_reqs
@@ -1,24 +1,34 @@
-#! /bin/sh
+#!/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.
-#
+/*
+   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
 
-echo "ERROR: Cordova tooling for Windows Phone requires a Windows OS with the 'msbuild' command "
-echo " in the PATH environment variable as well as having .NET Framework 4.0 (from WP SDK's)"
-exit 1
\ No newline at end of file
+     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 check_reqs = require('./lib/check_reqs');
+
+// check for help flag
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
+    check_reqs.help();
+} else {
+  check_reqs.run().done(function success(msbuild) {
+      console.log('Environment is supported; found MSBuild Tools version ' + msbuild.version + ' at ' + msbuild.path);
+  }, function (err) {
+      console.error('Failed to check requirements due to', err);
+      process.exit(2);
+  });
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/check_reqs.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/check_reqs.bat b/wp8/bin/check_reqs.bat
index f339c95..a68cfd9 100644
--- a/wp8/bin/check_reqs.bat
+++ b/wp8/bin/check_reqs.bat
@@ -19,11 +19,12 @@ goto endheader
 # under the License.
 #
 :endheader
-SET script_path="%~dp0check_reqs.js"
+
+SET script_path="%~dp0check_reqs"
 IF EXIST %script_path% (
-    cscript %script_path% %* //nologo
+    node %script_path% %*
 ) ELSE (
     ECHO.
-    ECHO ERROR: Could not find 'check_reqs.js' in 'bin' folder, aborting...>&2
+    ECHO ERROR: Could not find 'check_reqs' in 'bin' folder, aborting...>&2
     EXIT /B 1
 )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/check_reqs.js
----------------------------------------------------------------------
diff --git a/wp8/bin/check_reqs.js b/wp8/bin/check_reqs.js
deleted file mode 100644
index fa54707..0000000
--- a/wp8/bin/check_reqs.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-*/
-
-
-var args = WScript.Arguments;
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-function Usage() {
-    Log("Usage: [ check_reqs | cscript check_reqs.js ]");
-    Log("examples:");
-    Log("    cscript C:\\Users\\anonymous\\cordova-wp8\\bin\\check_reqs.js");
-    Log("    CordovaWindowsPhone\\bin\\check_reqs");
-
-}
-
-// log to stdout or stderr
-function Log(msg, error) {
-    if (error) {
-        WScript.StdErr.WriteLine(msg);
-    }
-    else {
-        WScript.StdOut.WriteLine(msg);
-    }
-}
-
-if (args.Count() > 0) {
-    // support help flags
-    if (args(0).indexOf("help") > -1 || args(0) == "/?" || args(0) == "-h") {
-        Usage();
-        WScript.Quit(1);
-    }
-    else {
-        Log('Error : Did not recognize argument ' + args(0), true);
-        Usage();
-        WScript.Quit(1);
-    }
-}
-else {
-/* The tooling for cordova windows phone requires these commands
- *  in the environment PATH variable.
- * - msbuild (ex. C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319)
- */
-    var version;
-
-    try {
-        version = wscript_shell.RegRead("HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0\\MSBuildRuntimeVersion");
-        if(version != null && version.indexOf("4.0") == 0) {
-            // All good!
-            Log(version);
-        }
-        else {
-            throw(new Error("version not 4.0"));
-        }
-    }
-    catch(err) {
-        Log('Please install the .NET Framework v4.0 (part of the latest windows phone SDK\'s).', true);
-        WScript.Quit(2);
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/create
----------------------------------------------------------------------
diff --git a/wp8/bin/create b/wp8/bin/create
new file mode 100644
index 0000000..a687b3b
--- /dev/null
+++ b/wp8/bin/create
@@ -0,0 +1,38 @@
+#!/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.
+*/
+
+/*
+ * create a cordova/windows8 project
+ * USAGE
+ *  ./create [path package activity]
+ *  ./bin/create.bat C:\Users\Me\MyTestProj "test.proj" "TestProject"
+ */
+
+var create = require('./lib/create');
+
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
+    create.help();
+} else {
+    create.run(process.argv).done(null, function (err) {
+        console.error('Failed to create project due to', err);
+        process.exit(2);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/create.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/create.bat b/wp8/bin/create.bat
index 3e3dbdf..4dcf337 100644
--- a/wp8/bin/create.bat
+++ b/wp8/bin/create.bat
@@ -19,11 +19,12 @@ goto endheader
 # under the License.
 #
 :endheader
+
 SET full_path=%~dp0
-IF EXIST "%full_path%create.js" (
-        cscript "%full_path%create.js" %* //nologo
+IF EXIST "%full_path%create" (
+        node "%full_path%create" %*
 ) ELSE (
     ECHO.
-    ECHO ERROR: Could not find 'create.js' in 'bin' folder, aborting...>&2
+    ECHO ERROR: Could not find 'create' in 'bin' folder, aborting...>&2
     EXIT /B 1
 )

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/create.js
----------------------------------------------------------------------
diff --git a/wp8/bin/create.js b/wp8/bin/create.js
deleted file mode 100644
index fdadf09..0000000
--- a/wp8/bin/create.js
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-*/
-
-/*
- * create a cordova/wp8 project
- *
- * USAGE
- *  ./create [path package activity]
-
-    ./bin/create.bat C:\Users\Me\MyTestProj "test.proj" "TestProject"
- */
-
-
-var fso=WScript.CreateObject("Scripting.FileSystemObject");
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-// working dir
-var platformRoot = WScript.ScriptFullName.split('\\bin\\create.js').join('');
-var repoRoot =  fso.GetParentFolderName(platformRoot);
-var args = WScript.Arguments;
-var destPath;
-
-
-Log("platformRoot = " + platformRoot);
-Log("repoRoot = " + repoRoot);
-
-
-function Usage() {
-    Log("Usage: create PathToNewProject [ PackageName AppName TemplatePath ]");
-    Log("    PathToNewProject : The path to where you wish to create the project");
-    Log("    PackageName      : The namespace for the project (default is Cordova.Example)");
-    Log("    AppName          : The name of the application (default is CordovaAppProj)");
-    Log("    TemplatePath      : The path to project template (default is ..\\template)");
-    Log("examples:");
-    Log("    create C:\\Users\\anonymous\\Desktop\\MyProject");
-    Log("    create C:\\Users\\anonymous\\Desktop\\MyProject io.Cordova.Example AnApp");
-}
-
-// logs messaged to stdout and stderr
-function Log(msg, error) {
-    if (error) {
-        WScript.StdErr.WriteLine(msg);
-    }
-    else {
-        WScript.StdOut.WriteLine(msg);
-    }
-}
-
-var ForReading = 1, ForWriting = 2, ForAppending = 8;
-var TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0;
-
-function read(filename) {
-    var f=fso.OpenTextFile(filename, 1,2);
-    var s=f.ReadAll();
-    f.Close();
-    return s;
-}
-
-// Reads content of utf-8 encoded file, removing BOM, if exist.
-function readUTF8 (filename) {
-    var inStream = WScript.CreateObject("ADODB.Stream");
-    inStream.Charset = "UTF-8";
-    inStream.Open();
-    inStream.LoadFromFile(filename);
-    var text = inStream.ReadText();
-    inStream.Close();
-    return text;
-}
-
-function write(filename, contents) {
-    var f=fso.OpenTextFile(filename, ForWriting, TristateTrue);
-    f.Write(contents);
-    f.Close();
-}
-
-// Writes content to utf-8 encoded file. Adds BOM if necessary.
-function writeUTF8 (filename, contents) {
-    var outStream = WScript.CreateObject("ADODB.Stream");
-    outStream.Mode = 3;
-    outStream.Open();
-    outStream.Charset = "UTF-8";
-    outStream.WriteText(contents);
-    outStream.SaveToFile(filename, 2);
-    outStream.Close();
-}
-
-function replaceInFile(filename, regexp, replacement) {
-    write(filename,read(filename).replace(regexp,replacement));
-}
-
-function replaceInUTF8 (filename, regexp, replacement) {
-    writeUTF8(filename, readUTF8(filename).replace(regexp, replacement));
-}
-
-// deletes file if it exists
-function deleteFileIfExists(path) {
-    if(fso.FileExists(path)) {
-        fso.DeleteFile(path);
-   }
-}
-
-
-// executes a commmand in the shell
-function exec(command) {
-    var oShell=wscript_shell.Exec(command);
-    while (oShell.Status == 0) {
-        WScript.sleep(100);
-    }
-}
-
-// executes a commmand in the shell
-function exec_verbose(command) {
-    //Log("Command: " + command);
-    var oShell=wscript_shell.Exec(command);
-    while (oShell.Status == 0) {
-        //Wait a little bit so we're not super looping
-        WScript.sleep(100);
-        //Print any stdout output from the script
-        if (!oShell.StdOut.AtEndOfStream) {
-            var line = oShell.StdOut.ReadLine();
-            Log(line);
-        }
-    }
-    //Check to make sure our scripts did not encounter an error
-    if (!oShell.StdErr.AtEndOfStream) {
-        var line = oShell.StdErr.ReadAll();
-        Log("ERROR: command failed in create.js : " + command);
-        Log(line, true);
-        WScript.Quit(1);
-    }
-}
-
-//generate guid for the project
-function genGuid() {
-    var TypeLib = WScript.CreateObject("Scriptlet.TypeLib");
-    strGuid = TypeLib.Guid.split("}")[0]; // there is extra crap after the } that is causing file streams to break, probably an EOF ... 
-    strGuid = strGuid.replace(/[\{\}]/g,""); 
-    return strGuid;
-}
-
-// creates new project in path, with the given package and app name
-function create(path, namespace, name, templatePath) {
-    Log("Creating Cordova-WP8 Project:");
-    Log("\tPathToNewProject : " + path);
-    Log("\tPackageName : " + namespace);
-    Log("\tAppName : " + name);
-    Log("\tTemplatePath : " + templatePath);
-
-    // test for valid identifiers, alpha-numeric + _$
-    if(!/^[a-zA-Z0-9._$]+$/g.test(namespace)) {
-        namespace = namespace.replace("-","_");
-        Log("Replaced '-' with '_' in PackageName : " + namespace);
-    }
-    // if replacing the - with a _ does not work, give up
-    if(!/^[a-zA-Z0-9._$]+$/g.test(namespace)) {
-        Log("Error : Invalid identifier! PackageName may only include letters, numbers, _ and $");
-        Usage();
-        WScript.Quit(1);
-    }
-
-    // Copy the template source files to the new destination
-    fso.CopyFolder(templatePath, path);
-    // copy over common files
-    //fso.CopyFolder(repoRoot + "\\common", path);
-    // copy the version file
-    fso.CopyFile(repoRoot +'\\VERSION',path + "\\" );
-
-    fso.CopyFile(platformRoot +'\\bin\\check_reqs.bat',path + "\\cordova\\" );
-    fso.CopyFile(platformRoot +'\\bin\\check_reqs.js',path + "\\cordova\\" );
-
-    // copy the defaults.xml into config.xml so this project can be built when create is called minus the cordova-cli
-    fso.CopyFile(path + "\\cordova\\defaults.xml", path + "\\config.xml");
-    
-    // remove template cruft
-    deleteFileIfExists(path + "\\__PreviewImage.jpg");
-    deleteFileIfExists(path + "\\__TemplateIcon.png");
-    deleteFileIfExists(path + "\\MyTemplate.vstemplate");
-
-    var newProjGuid = genGuid();
-    // replace the guid in the AppManifest
-    replaceInUTF8(path + "\\Properties\\WMAppManifest.xml","$guid1$",newProjGuid);
-    // replace safe-project-name in AppManifest
-    replaceInUTF8(path + "\\Properties\\WMAppManifest.xml",/\$safeprojectname\$/g,name);
-    replaceInUTF8(path + "\\Properties\\WMAppManifest.xml",/\$projectname\$/g,name);
-
-    replaceInUTF8(path + "\\App.xaml",/\$safeprojectname\$/g,namespace);
-    replaceInUTF8(path + "\\App.xaml.cs",/\$safeprojectname\$/g,namespace);
-
-    replaceInUTF8(path + "\\MainPage.xaml",/\$safeprojectname\$/g,namespace);
-    replaceInUTF8(path + "\\MainPage.xaml.cs",/\$safeprojectname\$/g,namespace);
-    replaceInUTF8(path + "\\CordovaWP8AppProj.csproj",/\$safeprojectname\$/g,namespace);
-
-    if (name != "CordovaWP8AppProj") {
-        var valid_name = name.replace(/(\.\s|\s\.|\s+|\.+)/g, '_');
-        replaceInUTF8(path + "\\CordovaWP8Solution.sln", /CordovaWP8AppProj/g, valid_name);
-        // rename project and solution
-        exec('%comspec% /c ren "' + path + '\\CordovaWP8Solution.sln" ' + valid_name + '.sln');
-        exec('%comspec% /c ren "' + path + '\\CordovaWP8AppProj.csproj" ' + valid_name + '.csproj');
-    }
-
-    //clean up any Bin/obj or other generated files
-    exec('cscript "' + path + '\\cordova\\lib\\clean.js" //nologo');
-
-    // delete any .user and .sou files if any
-    if (fso.FolderExists(path)) {
-        var proj_folder = fso.GetFolder(path);
-        var proj_files = new Enumerator(proj_folder.Files);
-        for (;!proj_files.atEnd(); proj_files.moveNext()) {
-            if (fso.GetExtensionName(proj_files.item()) == 'user') {
-                fso.DeleteFile(proj_files.item());
-            } else if (fso.GetExtensionName(proj_files.item()) == 'sou') {
-                fso.DeleteFile(proj_files.item());
-            }
-        }
-    }
-
-    Log("CREATE SUCCESS : " + path);
-
-}
-
-// MAIN
-
-if (args.Count() > 0) {
-    // support help flags
-    if (args(0) == "--help" || args(0) == "/?" ||
-            args(0) == "help" || args(0) == "-help" || args(0) == "/help" || args(0) == "-h") {
-        Usage();
-        WScript.Quit(1);
-    }
-
-    destPath = args(0);
-    if (fso.FolderExists(destPath)) {
-        Log("Project directory already exists:", true);
-        Log("\t" + destPath, true);
-        Log("CREATE FAILED.", true);
-        WScript.Quit(1);
-    }
-    else {
-        // Fix trailing slash issue
-        while(destPath.length && destPath.substr(destPath.length - 1,1) == "\\") {
-            destPath = destPath.substr(0,destPath.length - 1);
-        }
-        if(!destPath.length) {
-            Log("Invalid destination specified: " + args(0),true);
-            WScript.Quit(1);
-        }
-    }
-
-
-
-    var packageName = "Cordova.Example";
-    if (args.Count() > 1) {
-        packageName = args(1);
-    }
-
-    var projName = "CordovaWP8AppProj";
-    if (args.Count() > 2) {
-        projName = args(2);
-    }
-
-    var templatePath = platformRoot + "\\template";
-    if (args.Count() > 3) {
-        templatePath = args(3);
-    }
-
-    create(destPath, packageName, projName, templatePath);
-}
-else {
-    Usage();
-    WScript.Quit(1);
-}
-

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/createTemplates.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/createTemplates.bat b/wp8/bin/createTemplates.bat
index 6aa8f80..9824552 100644
--- a/wp8/bin/createTemplates.bat
+++ b/wp8/bin/createTemplates.bat
@@ -20,5 +20,4 @@ goto endheader
 #
 :endheader
 
-@echo off
 cscript "%~dp0\createTemplates.js" %* //nologo
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/wp8/bin/lib/check_reqs.js b/wp8/bin/lib/check_reqs.js
new file mode 100644
index 0000000..8a480e5
--- /dev/null
+++ b/wp8/bin/lib/check_reqs.js
@@ -0,0 +1,35 @@
+/*
+    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 Q     = require('Q'),
+    os    = require('os'),
+    MSBuildTools = require('../../template/cordova/lib/MSBuildTools');
+
+module.exports.run = function () {
+    if (os.platform() != 'win32'){
+      // Build Universal windows apps available for windows platform only, so we reject on others platforms
+        return Q.reject("ERROR: Cordova tooling for Windows requires Windows OS");
+    }
+    // Check whther MSBuild Tools are available
+    return MSBuildTools.findAvailableVersion();
+};
+
+module.exports.help = function () {
+    console.log("Usage: check_reqs or node check_reqs");
+};

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/wp8/bin/lib/create.js b/wp8/bin/lib/create.js
new file mode 100644
index 0000000..b42f03a
--- /dev/null
+++ b/wp8/bin/lib/create.js
@@ -0,0 +1,123 @@
+/*
+       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 Q     = require('Q'),
+    fs    = require('fs'),
+    path  = require('path'),
+    shell = require('shelljs'),
+    uuid  = require('node-uuid');
+
+var defaultAppName = "CordovaWP8AppProj";
+var defaultSlnName = "CordovaWP8Solution";
+
+// Creates cordova-windows project at specified path with specified namespace, app name and GUID
+module.exports.run = function (argv) {
+
+    // Get script args
+    var args = argv.slice(2);
+
+    // Set and validate parameters/defaults for create
+    
+    var projectPath = args[0];
+    if (fs.existsSync(projectPath)){
+        return Q.reject("Project directory already exists:\n\t" + projectPath);
+    }
+
+    // Package name can't contain dashes, so replace it with underscores
+    // if replacing the - with a _ does not work, give up
+    var packageName = args[1] ? args[1].replace("-", "_") : "Cordova.Example";
+    if(!/^[a-zA-Z0-9._$]+$/g.test(packageName)) {
+        return Q.reject("Invalid identifier. PackageName may only include letters, numbers, _ and $");
+    }
+
+    var appName = args[2] || defaultAppName,
+        safeAppName = appName.replace(/(\.\s|\s\.|\s+|\.+)/g, '_'),
+        platformRoot = path.join(__dirname, '..', '..'),
+        templatePath = path.join(platformRoot, "template"),
+        customTemplate = args[3];
+
+    console.log("Creating Cordova Windows Project:");
+    console.log("\tApp Name  : " + appName);
+    console.log("\tNamespace : " + packageName);
+    console.log("\tPath      : " + projectPath);
+    if (customTemplate) {
+        console.log("Custom template path: " + customTemplate);
+    }
+
+    console.log('Copying necessary files to ' + projectPath);
+    // Copy the template source files to the new destination
+    shell.cp("-rf", path.join(templatePath, '*'), projectPath);
+    // Copy our unique VERSION file, so peeps can tell what version this project was created from.
+    shell.cp("-rf", path.join(platformRoot, "..", 'VERSION'), projectPath);
+    // copy the defaults.xml into config.xml so this project can be built when create is called minus the cordova-cli
+    shell.cp(path.join(projectPath, "cordova", "defaults.xml"), path.join(projectPath, "config.xml"));
+
+    // if any custom template is provided, just copy it over created project
+    if (customTemplate && fs.existsSync(customTemplate)) {
+        console.log('Copying template overrides from ' + customTemplate + ' to ' + projectPath);
+        shell.cp("-rf", customTemplate, projectPath);
+    }
+
+    console.log("Updating project files");
+    // replace values in the AppManifest
+    var wmAppManifest = path.join(projectPath, "Properties", "WMAppManifest.xml"),
+        guid = uuid.v1();
+
+    shell.sed("-i", /\$guid1\$/g, guid, wmAppManifest);
+    shell.sed("-i", /\$safeprojectname\$/g, appName, wmAppManifest);
+
+    //replace projectname in project files
+    ["App.xaml", "App.xaml.cs", "MainPage.xaml", "MainPage.xaml.cs", defaultAppName + ".csproj"].forEach(function (file) {
+        shell.sed("-i", /\$safeprojectname\$/g, packageName, path.join(projectPath, file));
+    });
+    
+    if (appName != defaultAppName) {
+        var slnFile = path.join(projectPath, defaultSlnName + ".sln"),
+            csprojFile = path.join(projectPath, defaultAppName + ".csproj");
+
+        shell.sed("-i", new RegExp(defaultAppName, "g"), safeAppName, slnFile);
+        // rename project and solution
+        shell.mv("-f", slnFile, path.join(projectPath, safeAppName + ".sln"));
+        shell.mv("-f", csprojFile, path.join(projectPath, safeAppName + ".csproj"));
+    }
+
+    // remove template cruft
+    ["__PreviewImage.jpg", "__TemplateIcon.png", "MyTemplate.vstemplate"].forEach(function (file) {
+        shell.rm(path.join(projectPath, file));
+    });
+
+    // Delete bld forder and bin folder
+    ["bld", "bin", "*.user", "*.suo"].forEach(function (file) {
+        shell.rm('-rf', path.join(projectPath, file));
+    });
+    
+    return Q.resolve();
+};
+
+module.exports.help = function () {
+    console.log("Usage: create PathToNewProject [ PackageName [ AppName [ CustomTemplate ] ] ]");
+    console.log("    PathToNewProject : The path to where you wish to create the project");
+    console.log("    PackageName      : The namespace for the project (default is Cordova.Example)");
+    console.log("    AppName          : The name of the application (default is CordovaAppProj)");
+    console.log("    CustomTemplate   : The path to project template overrides");
+    console.log("                       (will be copied over default platform template files)");
+    console.log("examples:");
+    console.log("    create C:\\Users\\anonymous\\Desktop\\MyProject");
+    console.log("    create C:\\Users\\anonymous\\Desktop\\MyProject io.Cordova.Example AnApp");
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/lib/update.js
----------------------------------------------------------------------
diff --git a/wp8/bin/lib/update.js b/wp8/bin/lib/update.js
new file mode 100644
index 0000000..530852b
--- /dev/null
+++ b/wp8/bin/lib/update.js
@@ -0,0 +1,68 @@
+/*
+       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 Q      = require('Q'),
+    fs     = require('fs'),
+    path   = require('path'),
+    shell   = require('shelljs'),
+    create = require('./create');
+
+// returns package metadata from config.xml with fields 'namespace' and 'name'
+function extractMetadata(projectPath) {
+    if (!fs.existsSync(path.join(projectPath, 'config.xml'))){
+        return Q.reject('config.xml does not exist');
+    }
+
+    var meta =  { // default values
+        namespace: 'io.cordova.hellocordova',
+        name: 'HelloCordova'
+    };
+
+    // TODO: read real values from config.xml
+    // in case of Cordova CLI all values will be automatically updated by cli for you
+    // but the script could be used w/o CLI so we should correctly populate meta
+
+    return Q.resolve(meta);
+}
+
+module.exports.help = function () {
+    console.log("WARNING : Make sure to back up your project before updating!");
+    console.log("Usage: update PathToProject ");
+    console.log("    PathToProject : The path the project you would like to update.");
+    console.log("examples:");
+    console.log("    update C:\\Users\\anonymous\\Desktop\\MyProject");
+};
+
+// updates the cordova.js in project along with the cordova tooling.
+module.exports.run = function (argv) {
+    var projectPath = argv[2];
+    if (!fs.existsSync(projectPath)){
+        // if specified project path is not valid then reject promise
+        Q.reject("The given path to the project does not exist." +
+            " Please provide a path to the project you would like to update.");
+    }
+
+    return extractMetadata(projectPath).then(function (metadata) {
+        shell.rm('-rf', projectPath);
+
+        // setup args for create.run which requires process.argv-like array
+        var createArgs = argv.concat([metadata.namespace, metadata.name]);
+        return create.run(createArgs);
+    });
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/update
----------------------------------------------------------------------
diff --git a/wp8/bin/update b/wp8/bin/update
new file mode 100644
index 0000000..f3e8287
--- /dev/null
+++ b/wp8/bin/update
@@ -0,0 +1,34 @@
+#!/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 update = require('./lib/update');
+
+// check for help flag
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
+    update.help();
+} else {
+    update.run(process.argv).done(function () {
+        console.log('Successfully updated windows project.');
+    }, function (err) {
+        console.error('Failed to check requirements due to', err);
+        process.exit(2);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/update.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/update.bat b/wp8/bin/update.bat
index d39069d..122b082 100644
--- a/wp8/bin/update.bat
+++ b/wp8/bin/update.bat
@@ -19,11 +19,12 @@ goto endheader
 # under the License.
 #
 :endheader
-SET full_path=%~dp0
-IF EXIST %full_path%update.js (
-        cscript "%full_path%update.js" %* //nologo
+
+SET script_path="%~dp0update"
+IF EXIST %script_path% (
+    node %script_path% %*
 ) ELSE (
     ECHO.
-    ECHO ERROR: Could not find 'update.js' in 'bin' folder, aborting...>&2
+    ECHO ERROR: Could not find 'update' script in 'bin' folder, aborting...>&2
     EXIT /B 1
 )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/bin/update.js
----------------------------------------------------------------------
diff --git a/wp8/bin/update.js b/wp8/bin/update.js
deleted file mode 100644
index f2acd6f..0000000
--- a/wp8/bin/update.js
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-*/
-
-var fso           = WScript.CreateObject("Scripting.FileSystemObject");
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-var shell         = WScript.CreateObject("shell.application");
-var args          = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\bin\\update.js').join('');
-//Get version number
-var VERSION = read(ROOT+'\\VERSION').replace(/\r\n/,'').replace(/\n/,'');
-var plugins_folder = "\\Plugins";
-var template_folder = "\\templates\\standalone";
-// anything thats missing to the project
-var overwrite = false;
-var replace = false;
-
-// usage function
-function Usage() {
-    Log("WARNING : Make sure to back up your project before updating!")
-    Log("Usage: update Path-To-Project ");//[ -f | -r ] ");
-    Log("    Path-To-Old-Project : The path the project you would like to update.");
-    //Log("                     -f : Will forcefully overwrite and add all core components of the application.");
-    //Log("                     -r : Will create an updated project, only keeping the www assets. *NOTE: no native code will be preserved*");
-    Log("examples:");
-    Log("    update C:\\Users\\anonymous\\Desktop\\MyProject");
-}
-
-// logs messaged to stdout and stderr
-function Log(msg, error) {
-    if (error) {
-        WScript.StdErr.WriteLine(msg);
-    }
-    else {
-        WScript.StdOut.WriteLine(msg);
-    }
-}
-
-// executes a commmand in the shell
-function exec(command) {
-    Log("Command : " + command);
-    var oShell=wscript_shell.Exec(command);
-    while (oShell.Status === 0) {
-        WScript.sleep(100);
-    }
-}
-
-// executes a commmand in the shell
-function exec_verbose(command) {
-    Log("Command: " + command);
-    var oShell=wscript_shell.Exec(command);
-    while (oShell.Status == 0) {
-        //Wait a little bit so we're not super looping
-        WScript.sleep(100);
-        //Print any stdout output from the script
-        if (!oShell.StdOut.AtEndOfStream) {
-            var line = oShell.StdOut.ReadAll();
-            Log(line);
-        }
-    }
-    //Check to make sure our scripts did not encounter an error
-    if (!oShell.StdErr.AtEndOfStream) {
-        var line = oShell.StdErr.ReadAll();
-        Log(line, true);
-        WScript.Quit(2);
-    }
-}
-
-var ForReading = 1, ForWriting = 2, ForAppending = 8;
-var TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0;
-
-// returns the contents of a file
-function read(filename) {
-    if (fso.FileExists(filename)) {
-        var f=fso.OpenTextFile(filename, 1, 2);
-        var s=f.ReadAll();
-        f.Close();
-        return s;
-    }
-    else {
-        Log('Cannot read non-existant file : ' + filename, true);
-        WScript.Quit(2);
-    }
-    return null;
-}
-
-// writes the contents to the specified file
-function write(filename, contents) {
-    var f=fso.OpenTextFile(filename, ForWriting, TristateTrue);
-    f.Write(contents);
-    f.Close();
-}
-
-// replaces the matches of regexp with replacement
-function replaceInFile(filename, regexp, replacement) {
-    var text = read(filename).replace(regexp,replacement);
-    write(filename,text);
-}
-
-// returns true if the given path is the root of a cordova windows phone project
-// currently returns true if the folder contains a .csproj file.
-function is_windows_phone_project(path) {
-    if (fso.FolderExists(path)) {
-        var proj_folder = fso.GetFolder(path);
-        var proj_files = new Enumerator(proj_folder.Files);
-        for (;!proj_files.atEnd(); proj_files.moveNext()) {
-            if (fso.GetExtensionName(proj_files.item()) == 'csproj') {
-                return true;  
-            }
-        }
-    }
-    return false;
-}
-
-// returns the name of the application
-function get_app_name(path) {
-    var WMAppManifest = read(path + '\\Properties\\WMAppManifest.xml').split('\n');
-    for (line in WMAppManifest) {
-        if (WMAppManifest[line].match(/Title\=\"/)) {
-            return WMAppManifest[line].split('Title="')[1].split('"')[0];
-        }
-    }
-    Log("Error : unable to find applicaiton name in the project.", true);
-    Log(" Path : " + path, true);
-    WScript.Quit(2);
-}
-
-// returns the name of the application package
-function get_package_name(path) {
-    var WMAppManifest = read(path + '\\Properties\\WMAppManifest.xml').split('\n');
-    for (line in WMAppManifest) {
-        if (WMAppManifest[line].match(/Title\=\"/)) {
-            return WMAppManifest[line].split('Title="')[1].split('"')[0];
-        }
-    }
-    Log("Error : unable to find applicaiton name in the project.", true);
-    Log(" Path : " + path, true);
-    WScript.Quit(2);
-}
-
-// returns the GUID ame of the application
-function get_app_GUID(path) {
-    var AppXAML = read(path + '\\App.xaml').split('\n');
-    for (line in AppXAML) {
-        if (AppXAML[line].match(/x\:Class\=\"/)) {
-            return AppXAML[line].split('Class="')[1].split('"')[0];
-        }
-    }
-    Log("Error : unable to find package name in the project.", true);
-    Log(" Path : " + path, true);
-    WScript.Quit(2);
-}
-
-// updates the cordova.js and all references in the given project with this repositories version
-function update_cordova_js(path) {
-    // remove old cordova.js
-    var www_contents = shell.NameSpace(path + '\\www').Items();
-    for(i = 0; i < www_contents.Count; i++)
-    {
-        if(www_contents.Item(i).Name.match(/cordova\-(\d+)[.](\d+)[.](\d+)(rc\d)?[.]js/))
-        {
-            fso.DeleteFile(path + '\\www\\' + www_contents.Item(i).Name);
-        }
-    }
-    // update version file
-    copy_to(ROOT + "\\VERSION",  path + "\\VERSION");
-    // copy over new cordova.js
-    copy_to(ROOT + template_folder + "\\www\\cordova.js", path + "\\www\\cordova.js");
-
-    // update corodva references
-    var cordova_regex = /cordova-(\d+)[.](\d+)[.](\d+)(rc\d)?/g; //Matches *first* cordova-x.x.x[rcx] (just ad g at end to make global)
-    // update references in index.html
-    replaceInFile(path + '\\www\\index.html', cordova_regex,  "cordova");
-    version_regex = /return\s*\"(\d+)[.](\d+)[.](\d+)(rc\d)?/; //Matches return "x.x.x[rcx]
-    // update references in Device.cs
-    replaceInFile(path + '\\Plugins\\Device.cs', version_regex,  "return \"" + VERSION);
-}
-
-// Copies assets that need to be saved from source to desination.
-// TODO : Add all critical assets here
-function save_restore(source, destination) {
-    fso.CreateFolder(destination + '\\www');
-    copy_to(source + '\\www', destination + '\\www');
-    copy_to(source + '\\SplashScreenImage.jpg', destination + '\\SplashScreenImage.jpg');
-    copy_to(source + '\\Background.png', destination + '\\Background.png');
-    copy_to(source + '\\ApplicationIcon.png', destination + '\\ApplicationIcon.png');
-    copy_to(source + '\\config.xml', destination + '\\config.xml');
-}
-
-// deletes the path element if it exists
-function delete_if_exists(path) {
-    if (fso.FolderExists(path)) {
-        fso.DeleteFolder(path);
-    }
-    else if (fso.FileExists(path)) {
-        fso.DeleteFile(path);
-    }
-}
-
-// copies a folder or file from source to destination
-function copy_to(source, destination) {
-    // check that source exists
-    if (!fso.FolderExists(source)) {
-        if (!fso.FileExists(source)) {
-            Log("Error : Could not copy file/folder because it doesn't exist.", true);
-            Log("      File/Folder : " + source, true);
-            WScript.Quit(2);
-        }
-    }
-    // if source is a folder, then copy all folder contents
-    if (fso.FolderExists(source)) {
-        fso.CopyFolder(source, destination, true);
-    } 
-    // if it's a file, just copy it.
-    else { 
-        exec('%comspec% /c copy /Y /V ' + source + ' ' + destination);
-    }
-}
-
-// updates the cordova.js in project along with the cordova tooling.
-function update_project(path) {
-    // update cordova folder
-    delete_if_exists(path + '\\cordova');
-    fso.CreateFolder(path + '\\cordova');
-    copy_to(ROOT + template_folder + '\\cordova', path + '\\cordova');
-    // clean project (all generated files)
-    exec(path + '\\cordova\\clean.bat');
-
-    // update core cordovalib
-    delete_if_exists(path + '\\cordovalib');
-    fso.CreateFolder(path + '\\cordovalib');
-    copy_to(ROOT + template_folder + '\\cordovalib', path + '\\cordovalib');
-
-    // update core plugins
-    // TODO : Remove for 3.0.0
-    delete_if_exists(path + '\\Plugins');
-    fso.CreateFolder(path + '\\Plugins');
-    copy_to(ROOT + template_folder + '\\Plugins', path + '\\Plugins');
-
-    // update cordova.js
-    update_cordova_js(path);
-}
-
-// Replaces the current project with a newly created project, keeping important assets to preserve the app.
-// TODO: Things that need to be kept other then www
-// - WMAppManifest (capabilities etc...)
-// - GUID (for marketplace apps etc...)
-// - Splashscreen and other images etc...
-// - Find more things that should be kept
-function replace_project(path) {
-    //create new project and move www assets into it.
-    Log("WARNING : Upgrading your app with the \'-r\' flag will delete all native and plugin");
-    Log(" components of your application and replace them with the updated core components given");
-    Log(" by this platforms \'bin\\create\' script.  It is *HIGHLY RECOMMENDED* to back up your app");
-    Log(" before continuing. The name and package name along with all of the www assets will be");
-    Log(" preserved. Are you sure you wish to continue? (Y/N)");
-    var response;
-    while (response != 'Y') {
-        response = WScript.StdIn.ReadLine();
-        if (response == 'N') {
-            WScript.Quit(2);
-        } else if (response != "Y") {
-            Log("Error :  did not recognize '" + response + "'");
-            Log("Are you sure you wish to continue? (Y/N)");
-        }
-    }
-    // place all assets to be preserved in a temperary folder
-    delete_if_exists(ROOT + '\\temp');
-    fso.CreateFolder(ROOT + '\\temp');
-    save_restore(path, ROOT + '\\temp');
-
-    // get app name from WMAppManifest
-    var app_name = get_app_name(path);
-    // get package name from App.xaml
-    var package_name = get_package_name(path);
-    // get the GUID so that app stays the same
-    var app_GUID = get_app_GUID(path);
-    // delete previous project
-    delete_if_exists(path);
-    // create the new project from the current repository
-    exec(ROOT + '\\bin\\create.bat ' + path + ' ' + app_name + ' ' + package_name);
-    // remove default www assets
-    delete_if_exists(path + '\\www');
-    // move www assets back to project folder
-    save_restore(ROOT + '\\temp', path);
-    // cleanup temp folder
-    delete_if_exists(ROOT + '\\temp');
-}
-
-
-
-if (args.Count() > 0) {
-    if(args.Count() > 2) {
-        Log("Error : too many arguments provided.", true);
-        WScript.Quit(1);
-    }
-
-    if (args(0).indexOf("--help") > -1 ||
-          args(0).indexOf("/?") > -1 ) {
-        Usage();
-        WScript.Quit(1);
-    }
-    else if (fso.FolderExists(args(0)) && is_windows_phone_project(args(0))) {
-        if(args.Count() > 1) {
-            /*if(args(1) == '-f' || args(1) == '--force') {
-                //TODO: do something for this
-                Log("ERROR : NOT IMPLEMENTED", true);
-                WScript.Quit(2);
-            }
-            else if(args(1) == '-r' || args(1) == '--replace') {
-                replace_project(args(0));
-            }
-            else {
-                Log('Error : \'' + args(1) + '\' is not regognized as an update option', true);
-            }*/
-            Usage();
-            Log('Error : too many arguments', true);
-        } else if (args.Count() == 1) {
-            update_project(args(0));
-        }
-    }
-    else if (fso.FolderExists(args(0))) {
-        Log("The path provided is not a path to a cordova windows phone project.", true);
-        Log(" Please provide the path to the root folder of your cordova windows phone project.", true);
-        WScript.Quit(2);
-    }
-    else {
-        Log("The given path to the project does not exist.", true);
-        Log(" Please provide a path to the project you would like to update.", true);
-        Usage();
-        WScript.Quit(2);
-    }
-}
-else {
-    Usage();
-    WScript.Quit(1);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/.bin/nopt
----------------------------------------------------------------------
diff --git a/wp8/node_modules/.bin/nopt b/wp8/node_modules/.bin/nopt
new file mode 100644
index 0000000..25995f3
--- /dev/null
+++ b/wp8/node_modules/.bin/nopt
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=`dirname "$0"`
+
+case `uname` in
+    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../nopt/bin/nopt.js" "$@"
+  ret=$?
+else 
+  node  "$basedir/../nopt/bin/nopt.js" "$@"
+  ret=$?
+fi
+exit $ret

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/.bin/nopt.cmd
----------------------------------------------------------------------
diff --git a/wp8/node_modules/.bin/nopt.cmd b/wp8/node_modules/.bin/nopt.cmd
new file mode 100644
index 0000000..c8e8216
--- /dev/null
+++ b/wp8/node_modules/.bin/nopt.cmd
@@ -0,0 +1,5 @@
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\nopt\bin\nopt.js" %*
+) ELSE (
+  node  "%~dp0\..\nopt\bin\nopt.js" %*
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/.bin/shjs
----------------------------------------------------------------------
diff --git a/wp8/node_modules/.bin/shjs b/wp8/node_modules/.bin/shjs
new file mode 100644
index 0000000..9908675
--- /dev/null
+++ b/wp8/node_modules/.bin/shjs
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=`dirname "$0"`
+
+case `uname` in
+    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  "$basedir/node"  "$basedir/../shelljs/bin/shjs" "$@"
+  ret=$?
+else 
+  node  "$basedir/../shelljs/bin/shjs" "$@"
+  ret=$?
+fi
+exit $ret

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/.bin/shjs.cmd
----------------------------------------------------------------------
diff --git a/wp8/node_modules/.bin/shjs.cmd b/wp8/node_modules/.bin/shjs.cmd
new file mode 100644
index 0000000..9ce460a
--- /dev/null
+++ b/wp8/node_modules/.bin/shjs.cmd
@@ -0,0 +1,5 @@
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\shelljs\bin\shjs" %*
+) ELSE (
+  node  "%~dp0\..\shelljs\bin\shjs" %*
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/.npmignore
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/.npmignore b/wp8/node_modules/node-uuid/.npmignore
new file mode 100644
index 0000000..fd4f2b0
--- /dev/null
+++ b/wp8/node_modules/node-uuid/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+.DS_Store

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/LICENSE.md
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/LICENSE.md b/wp8/node_modules/node-uuid/LICENSE.md
new file mode 100644
index 0000000..f039427
--- /dev/null
+++ b/wp8/node_modules/node-uuid/LICENSE.md
@@ -0,0 +1,2 @@
+Copyright (c) 2010-2012 Robert Kieffer
+MIT License - http://opensource.org/licenses/mit-license.php

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/README.md
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/README.md b/wp8/node_modules/node-uuid/README.md
new file mode 100644
index 0000000..e436a89
--- /dev/null
+++ b/wp8/node_modules/node-uuid/README.md
@@ -0,0 +1,207 @@
+# node-uuid
+
+Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
+
+Features:
+
+* Generate RFC4122 version 1 or version 4 UUIDs
+* Runs in node.js and all browsers.
+* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').
+* Cryptographically strong random # generation on supporting platforms
+* 1.1K minified and gzip'ed  (Want something smaller?  Check this [crazy shit](https://gist.github.com/982883) out! )
+* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
+
+## Getting Started
+
+Install it in your browser:
+
+```html
+<script src="uuid.js"></script>
+```
+
+Or in node.js:
+
+```
+npm install node-uuid
+```
+
+```javascript
+var uuid = require('node-uuid');
+```
+
+Then create some ids ...
+
+```javascript
+// Generate a v1 (time-based) id
+uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
+
+// Generate a v4 (random) id
+uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
+```
+
+## API
+
+### uuid.v1([`options` [, `buffer` [, `offset`]]])
+
+Generate and return a RFC4122 v1 (timestamp-based) UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+  * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID.  See note 1.
+  * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence.  Default: An internally maintained clockseq is used.
+  * `msecs` - (Number | Date) Time in milliseconds since unix Epoch.  Default: The current time is used.
+  * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
+
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Notes:
+
+1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
+
+Example: Generate string UUID with fully-specified options
+
+```javascript
+uuid.v1({
+  node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+  clockseq: 0x1234,
+  msecs: new Date('2011-11-01').getTime(),
+  nsecs: 5678
+});   // -> "710b962e-041c-11e1-9234-0123456789ab"
+```
+
+Example: In-place generation of two binary IDs
+
+```javascript
+// Generate two ids in an array
+var arr = new Array(32); // -> []
+uuid.v1(null, arr, 0);   // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
+uuid.v1(null, arr, 16);  // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
+
+// Optionally use uuid.unparse() to get stringify the ids
+uuid.unparse(buffer);    // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
+uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
+```
+
+### uuid.v4([`options` [, `buffer` [, `offset`]]])
+
+Generate and return a RFC4122 v4 UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+  * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
+  * `rng` - (Function) Random # generator to use.  Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
+
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example: Generate string UUID with fully-specified options
+
+```javascript
+uuid.v4({
+  random: [
+    0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
+    0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
+  ]
+});
+// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
+```
+
+Example: Generate two IDs in a single buffer
+
+```javascript
+var buffer = new Array(32); // (or 'new Buffer' in node.js)
+uuid.v4(null, buffer, 0);
+uuid.v4(null, buffer, 16);
+```
+
+### uuid.parse(id[, buffer[, offset]])
+### uuid.unparse(buffer[, offset])
+
+Parse and unparse UUIDs
+
+  * `id` - (String) UUID(-like) string
+  * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used
+  * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0
+
+Example parsing and unparsing a UUID string
+
+```javascript
+var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>
+var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'
+```
+
+### uuid.noConflict()
+
+(Browsers only) Set `uuid` property back to it's previous value.
+
+Returns the node-uuid object.
+
+Example:
+
+```javascript
+var myUuid = uuid.noConflict();
+myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
+```
+
+## Deprecated APIs
+
+Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.
+
+### uuid([format [, buffer [, offset]]])
+
+uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).
+
+### uuid.BufferClass
+
+The class of container created when generating binary uuid data if no buffer argument is specified.  This is expected to go away, with no replacement API.
+
+## Testing
+
+In node.js
+
+```
+> cd test
+> node test.js
+```
+
+In Browser
+
+```
+open test/test.html
+```
+
+### Benchmarking
+
+Requires node.js
+
+```
+npm install uuid uuid-js
+node benchmark/benchmark.js
+```
+
+For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)
+
+For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
+
+## Release notes
+
+### 1.4.0
+
+* Improved module context detection
+* Removed public RNG functions
+
+### 1.3.2
+
+* Improve tests and handling of v1() options (Issue #24)
+* Expose RNG option to allow for perf testing with different generators
+
+### 1.3.0
+
+* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
+* Support for node.js crypto API
+* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/benchmark/README.md
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/benchmark/README.md b/wp8/node_modules/node-uuid/benchmark/README.md
new file mode 100644
index 0000000..aaeb2ea
--- /dev/null
+++ b/wp8/node_modules/node-uuid/benchmark/README.md
@@ -0,0 +1,53 @@
+# node-uuid Benchmarks
+
+### Results
+
+To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark
+
+### Run them yourself
+
+node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`.
+
+To prepare and run the benchmark issue;
+
+```
+npm install uuid uuid-js
+node benchmark/benchmark.js
+```
+
+You'll see an output like this one:
+
+```
+# v4
+nodeuuid.v4(): 854700 uuids/second
+nodeuuid.v4('binary'): 788643 uuids/second
+nodeuuid.v4('binary', buffer): 1336898 uuids/second
+uuid(): 479386 uuids/second
+uuid('binary'): 582072 uuids/second
+uuidjs.create(4): 312304 uuids/second
+
+# v1
+nodeuuid.v1(): 938086 uuids/second
+nodeuuid.v1('binary'): 683060 uuids/second
+nodeuuid.v1('binary', buffer): 1644736 uuids/second
+uuidjs.create(1): 190621 uuids/second
+```
+
+* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library.
+* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK.
+
+If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file:
+
+```
+for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done;
+```
+
+If you're interested in how performance varies between different node versions, you can issue the above command multiple times.
+
+You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot:
+
+```
+(cd benchmark/ && ./bench.sh)
+```
+
+This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then.

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/benchmark/bench.gnu
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/benchmark/bench.gnu b/wp8/node_modules/node-uuid/benchmark/bench.gnu
new file mode 100644
index 0000000..a342fbb
--- /dev/null
+++ b/wp8/node_modules/node-uuid/benchmark/bench.gnu
@@ -0,0 +1,174 @@
+#!/opt/local/bin/gnuplot -persist
+#
+#    
+#    	G N U P L O T
+#    	Version 4.4 patchlevel 3
+#    	last modified March 2011
+#    	System: Darwin 10.8.0
+#    
+#    	Copyright (C) 1986-1993, 1998, 2004, 2007-2010
+#    	Thomas Williams, Colin Kelley and many others
+#    
+#    	gnuplot home:     http://www.gnuplot.info
+#    	faq, bugs, etc:   type "help seeking-assistance"
+#    	immediate help:   type "help"
+#    	plot window:      hit 'h'
+set terminal postscript eps noenhanced defaultplex \
+ leveldefault color colortext \
+ solid linewidth 1.2 butt noclip \
+ palfuncparam 2000,0.003 \
+ "Helvetica" 14 
+set output 'bench.eps'
+unset clip points
+set clip one
+unset clip two
+set bar 1.000000 front
+set border 31 front linetype -1 linewidth 1.000
+set xdata
+set ydata
+set zdata
+set x2data
+set y2data
+set timefmt x "%d/%m/%y,%H:%M"
+set timefmt y "%d/%m/%y,%H:%M"
+set timefmt z "%d/%m/%y,%H:%M"
+set timefmt x2 "%d/%m/%y,%H:%M"
+set timefmt y2 "%d/%m/%y,%H:%M"
+set timefmt cb "%d/%m/%y,%H:%M"
+set boxwidth
+set style fill  empty border
+set style rectangle back fc lt -3 fillstyle   solid 1.00 border lt -1
+set style circle radius graph 0.02, first 0, 0 
+set dummy x,y
+set format x "% g"
+set format y "% g"
+set format x2 "% g"
+set format y2 "% g"
+set format z "% g"
+set format cb "% g"
+set angles radians
+unset grid
+set key title ""
+set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox
+set key noinvert samplen 4 spacing 1 width 0 height 0 
+set key maxcolumns 2 maxrows 0
+unset label
+unset arrow
+set style increment default
+unset style line
+set style line 1  linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0
+unset style arrow
+set style histogram clustered gap 2 title  offset character 0, 0, 0
+unset logscale
+set offsets graph 0.05, 0.15, 0, 0
+set pointsize 1.5
+set pointintervalbox 1
+set encoding default
+unset polar
+unset parametric
+unset decimalsign
+set view 60, 30, 1, 1
+set samples 100, 100
+set isosamples 10, 10
+set surface
+unset contour
+set clabel '%8.3g'
+set mapping cartesian
+set datafile separator whitespace
+unset hidden3d
+set cntrparam order 4
+set cntrparam linear
+set cntrparam levels auto 5
+set cntrparam points 5
+set size ratio 0 1,1
+set origin 0,0
+set style data points
+set style function lines
+set xzeroaxis linetype -2 linewidth 1.000
+set yzeroaxis linetype -2 linewidth 1.000
+set zzeroaxis linetype -2 linewidth 1.000
+set x2zeroaxis linetype -2 linewidth 1.000
+set y2zeroaxis linetype -2 linewidth 1.000
+set ticslevel 0.5
+set mxtics default
+set mytics default
+set mztics default
+set mx2tics default
+set my2tics default
+set mcbtics default
+set xtics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
+set xtics  norangelimit
+set xtics   ()
+set ytics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
+set ytics autofreq  norangelimit
+set ztics border in scale 1,0.5 nomirror norotate  offset character 0, 0, 0
+set ztics autofreq  norangelimit
+set nox2tics
+set noy2tics
+set cbtics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
+set cbtics autofreq  norangelimit
+set title "" 
+set title  offset character 0, 0, 0 font "" norotate
+set timestamp bottom 
+set timestamp "" 
+set timestamp  offset character 0, 0, 0 font "" norotate
+set rrange [ * : * ] noreverse nowriteback  # (currently [8.98847e+307:-8.98847e+307] )
+set autoscale rfixmin
+set autoscale rfixmax
+set trange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
+set autoscale tfixmin
+set autoscale tfixmax
+set urange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
+set autoscale ufixmin
+set autoscale ufixmax
+set vrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
+set autoscale vfixmin
+set autoscale vfixmax
+set xlabel "" 
+set xlabel  offset character 0, 0, 0 font "" textcolor lt -1 norotate
+set x2label "" 
+set x2label  offset character 0, 0, 0 font "" textcolor lt -1 norotate
+set xrange [ * : * ] noreverse nowriteback  # (currently [-0.150000:3.15000] )
+set autoscale xfixmin
+set autoscale xfixmax
+set x2range [ * : * ] noreverse nowriteback  # (currently [0.00000:3.00000] )
+set autoscale x2fixmin
+set autoscale x2fixmax
+set ylabel "" 
+set ylabel  offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
+set y2label "" 
+set y2label  offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
+set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback  # (currently [:] )
+set autoscale yfixmin
+set autoscale yfixmax
+set y2range [ * : * ] noreverse nowriteback  # (currently [0.00000:1.90000e+06] )
+set autoscale y2fixmin
+set autoscale y2fixmax
+set zlabel "" 
+set zlabel  offset character 0, 0, 0 font "" textcolor lt -1 norotate
+set zrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
+set autoscale zfixmin
+set autoscale zfixmax
+set cblabel "" 
+set cblabel  offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
+set cbrange [ * : * ] noreverse nowriteback  # (currently [8.98847e+307:-8.98847e+307] )
+set autoscale cbfixmin
+set autoscale cbfixmax
+set zero 1e-08
+set lmargin  -1
+set bmargin  -1
+set rmargin  -1
+set tmargin  -1
+set pm3d explicit at s
+set pm3d scansautomatic
+set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
+set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB 
+set palette rgbformulae 7, 5, 15
+set colorbox default
+set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
+set loadpath 
+set fontpath 
+set fit noerrorvariables
+GNUTERM = "aqua"
+plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2
+#    EOF

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/benchmark/bench.sh
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/benchmark/bench.sh b/wp8/node_modules/node-uuid/benchmark/bench.sh
new file mode 100644
index 0000000..d870a0c
--- /dev/null
+++ b/wp8/node_modules/node-uuid/benchmark/bench.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# for a given node version run:
+# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done;
+
+PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte')
+FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es)
+INDICES=(2 3 2 3 2 2 2 2 2)
+VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " )
+TMPJOIN="tmp_join"
+OUTPUT="bench_results.txt"
+
+for I in ${!FILES[*]}; do
+  F=${FILES[$I]}
+  P=${PATTERNS[$I]}
+  INDEX=${INDICES[$I]}
+  echo "version $F" > $F
+  for V in $VERSIONS; do
+    (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F
+  done
+  if [ $I == 0 ]; then
+    cat $F > $TMPJOIN
+  else
+    join $TMPJOIN $F > $OUTPUT
+    cp $OUTPUT $TMPJOIN
+  fi
+  rm $F
+done
+
+rm $TMPJOIN
+
+gnuplot bench.gnu
+convert -density 200 -resize 800x560 -flatten bench.eps bench.png
+rm bench.eps

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/benchmark/benchmark-native.c
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/benchmark/benchmark-native.c b/wp8/node_modules/node-uuid/benchmark/benchmark-native.c
new file mode 100644
index 0000000..dbfc75f
--- /dev/null
+++ b/wp8/node_modules/node-uuid/benchmark/benchmark-native.c
@@ -0,0 +1,34 @@
+/*
+Test performance of native C UUID generation
+
+To Compile: cc -luuid benchmark-native.c -o benchmark-native
+*/
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <uuid/uuid.h>
+
+int main() {
+  uuid_t myid;
+  char buf[36+1];
+  int i;
+  struct timeval t;
+  double start, finish;
+
+  gettimeofday(&t, NULL);
+  start = t.tv_sec + t.tv_usec/1e6;
+
+  int n = 2e5;
+  for (i = 0; i < n; i++) {
+    uuid_generate(myid);
+    uuid_unparse(myid, buf);
+  }
+
+  gettimeofday(&t, NULL);
+  finish = t.tv_sec + t.tv_usec/1e6;
+  double dur = finish - start;
+
+  printf("%d uuids/sec", (int)(n/dur));
+  return 0;
+}

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/benchmark/benchmark.js
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/benchmark/benchmark.js b/wp8/node_modules/node-uuid/benchmark/benchmark.js
new file mode 100644
index 0000000..40e6efb
--- /dev/null
+++ b/wp8/node_modules/node-uuid/benchmark/benchmark.js
@@ -0,0 +1,84 @@
+try {
+  var nodeuuid = require('../uuid');
+} catch (e) {
+  console.error('node-uuid require failed - skipping tests');
+}
+
+try {
+  var uuid = require('uuid');
+} catch (e) {
+  console.error('uuid require failed - skipping tests');
+}
+
+try {
+  var uuidjs = require('uuid-js');
+} catch (e) {
+  console.error('uuid-js require failed - skipping tests');
+}
+
+var N = 5e5;
+
+function rate(msg, t) {
+  console.log(msg + ': ' +
+    (N / (Date.now() - t) * 1e3 | 0) +
+    ' uuids/second');
+}
+
+console.log('# v4');
+
+// node-uuid - string form
+if (nodeuuid) {
+  for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4();
+  rate('nodeuuid.v4() - using node.js crypto RNG', t);
+
+  for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG});
+  rate('nodeuuid.v4() - using Math.random() RNG', t);
+
+  for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary');
+  rate('nodeuuid.v4(\'binary\')', t);
+
+  var buffer = new nodeuuid.BufferClass(16);
+  for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer);
+  rate('nodeuuid.v4(\'binary\', buffer)', t);
+}
+
+// libuuid - string form
+if (uuid) {
+  for (var i = 0, t = Date.now(); i < N; i++) uuid();
+  rate('uuid()', t);
+
+  for (var i = 0, t = Date.now(); i < N; i++) uuid('binary');
+  rate('uuid(\'binary\')', t);
+}
+
+// uuid-js - string form
+if (uuidjs) {
+  for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4);
+  rate('uuidjs.create(4)', t);
+}
+
+// 140byte.es
+for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)});
+rate('140byte.es_v4', t);
+
+console.log('');
+console.log('# v1');
+
+// node-uuid - v1 string form
+if (nodeuuid) {
+  for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1();
+  rate('nodeuuid.v1()', t);
+
+  for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary');
+  rate('nodeuuid.v1(\'binary\')', t);
+
+  var buffer = new nodeuuid.BufferClass(16);
+  for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer);
+  rate('nodeuuid.v1(\'binary\', buffer)', t);
+}
+
+// uuid-js - v1 string form
+if (uuidjs) {
+  for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1);
+  rate('uuidjs.create(1)', t);
+}

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c2c2e564/wp8/node_modules/node-uuid/component.json
----------------------------------------------------------------------
diff --git a/wp8/node_modules/node-uuid/component.json b/wp8/node_modules/node-uuid/component.json
new file mode 100644
index 0000000..ace2134
--- /dev/null
+++ b/wp8/node_modules/node-uuid/component.json
@@ -0,0 +1,18 @@
+{
+  "name": "node-uuid",
+  "repo": "broofa/node-uuid",
+  "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
+  "version": "1.4.0",
+  "author": "Robert Kieffer <ro...@broofa.com>",
+  "contributors": [
+    {"name": "Christoph Tavan <de...@tavan.de>", "github": "https://github.com/ctavan"}
+  ],
+  "keywords": ["uuid", "guid", "rfc4122"],
+  "dependencies": {},
+  "development": {},
+  "main": "uuid.js",
+  "scripts": [
+    "uuid.js"
+  ],
+  "license": "MIT"
+}
\ No newline at end of file