cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [33/61] [abbrv] [partial] cordova-create git commit: gitignore node modules
Date Mon, 01 Aug 2016 22:22:52 GMT
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/FileUpdater.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/FileUpdater.js b/node_modules/cordova-common/src/FileUpdater.js
deleted file mode 100644
index a09f39c..0000000
--- a/node_modules/cordova-common/src/FileUpdater.js
+++ /dev/null
@@ -1,422 +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.
-*/
-
-"use strict";
-
-var fs = require("fs");
-var path = require("path");
-var shell = require("shelljs");
-var minimatch = require("minimatch");
-
-/**
- * Logging callback used in the FileUpdater methods.
- * @callback loggingCallback
- * @param {string} message A message describing a single file update operation.
- */
-
-/**
- * Updates a target file or directory with a source file or directory. (Directory updates are
- * not recursive.) Stats for target and source items must be passed in. This is an internal
- * helper function used by other methods in this module.
- *
- * @param {?string} sourcePath Source file or directory to be used to update the
- *     destination. If the source is null, then the destination is deleted if it exists.
- * @param {?fs.Stats} sourceStats An instance of fs.Stats for the source path, or null if
- *     the source does not exist.
- * @param {string} targetPath Required destination file or directory to be updated. If it does
- *     not exist, it will be created.
- * @param {?fs.Stats} targetStats An instance of fs.Stats for the target path, or null if
- *     the target does not exist.
- * @param {Object} [options] Optional additional parameters for the update.
- * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
- *     and source path parameters are relative; may be omitted if the paths are absolute. The
- *     rootDir is always omitted from any logged paths, to make the logs easier to read.
- * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
- *     Otherwise, a file is copied if the source's last-modified time is greather than or
- *     equal to the target's last-modified time, or if the file sizes are different.
- * @param {loggingCallback} [log] Optional logging callback that takes a string message
- *     describing any file operations that are performed.
- * @return {boolean} true if any changes were made, or false if the force flag is not set
- *     and everything was up to date
- */
-function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log) {
-    var updated = false;
-
-    var rootDir = (options && options.rootDir) || "";
-    var copyAll = (options && options.all) || false;
-
-    var targetFullPath = path.join(rootDir || "", targetPath);
-
-    if (sourceStats) {
-        var sourceFullPath = path.join(rootDir || "", sourcePath);
-
-        if (targetStats) {
-            // The target exists. But if the directory status doesn't match the source, delete it.
-            if (targetStats.isDirectory() && !sourceStats.isDirectory()) {
-                log("rmdir  " + targetPath + " (source is a file)");
-                shell.rm("-rf", targetFullPath);
-                targetStats = null;
-                updated = true;
-            } else if (!targetStats.isDirectory() && sourceStats.isDirectory()) {
-                log("delete " + targetPath + " (source is a directory)");
-                shell.rm("-f", targetFullPath);
-                targetStats = null;
-                updated = true;
-            }
-        }
-
-        if (!targetStats) {
-            if (sourceStats.isDirectory()) {
-                // The target directory does not exist, so it should be created.
-                log("mkdir " + targetPath);
-                shell.mkdir("-p", targetFullPath);
-                updated = true;
-            } else if (sourceStats.isFile()) {
-                // The target file does not exist, so it should be copied from the source.
-                log("copy  " + sourcePath + " " + targetPath + (copyAll ? "" : " (new file)"));
-                shell.cp("-f", sourceFullPath, targetFullPath);
-                updated = true;
-            }
-        } else if (sourceStats.isFile() && targetStats.isFile()) {
-            // The source and target paths both exist and are files.
-            if (copyAll) {
-                // The caller specified all files should be copied.
-                log("copy  " + sourcePath + " " + targetPath);
-                shell.cp("-f", sourceFullPath, targetFullPath);
-                updated = true;
-            } else {
-                // Copy if the source has been modified since it was copied to the target, or if
-                // the file sizes are different. (The latter catches most cases in which something
-                // was done to the file after copying.) Comparison is >= rather than > to allow
-                // for timestamps lacking sub-second precision in some filesystems.
-                if (sourceStats.mtime.getTime() >= targetStats.mtime.getTime() ||
-                        sourceStats.size !== targetStats.size) {
-                    log("copy  " + sourcePath + " " + targetPath + " (updated file)");
-                    shell.cp("-f", sourceFullPath, targetFullPath);
-                    updated = true;
-                }
-            }
-        }
-    } else if (targetStats) {
-        // The target exists but the source is null, so the target should be deleted.
-        if (targetStats.isDirectory()) {
-            log("rmdir  " + targetPath + (copyAll ? "" : " (no source)"));
-            shell.rm("-rf", targetFullPath);
-        } else {
-            log("delete " + targetPath + (copyAll ? "" : " (no source)"));
-            shell.rm("-f", targetFullPath);
-        }
-        updated = true;
-    }
-
-    return updated;
-}
-
-/**
- * Helper for updatePath and updatePaths functions. Queries stats for source and target
- * and ensures target directory exists before copying a file.
- */
-function updatePathInternal(sourcePath, targetPath, options, log) {
-    var rootDir = (options && options.rootDir) || "";
-    var targetFullPath = path.join(rootDir, targetPath);
-    var targetStats = fs.existsSync(targetFullPath) ? fs.statSync(targetFullPath) : null;
-    var sourceStats = null;
-
-    if (sourcePath) {
-        // A non-null source path was specified. It should exist.
-        var sourceFullPath = path.join(rootDir, sourcePath);
-        if (!fs.existsSync(sourceFullPath)) {
-            throw new Error("Source path does not exist: " + sourcePath);
-        }
-
-        sourceStats = fs.statSync(sourceFullPath);
-
-        // Create the target's parent directory if it doesn't exist.
-        var parentDir = path.dirname(targetFullPath);
-        if (!fs.existsSync(parentDir)) {
-            shell.mkdir("-p", parentDir);
-        }
-    }
-
-    return updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log);
-}
-
-/**
- * Updates a target file or directory with a source file or directory. (Directory updates are
- * not recursive.)
- *
- * @param {?string} sourcePath Source file or directory to be used to update the
- *     destination. If the source is null, then the destination is deleted if it exists.
- * @param {string} targetPath Required destination file or directory to be updated. If it does
- *     not exist, it will be created.
- * @param {Object} [options] Optional additional parameters for the update.
- * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
- *     and source path parameters are relative; may be omitted if the paths are absolute. The
- *     rootDir is always omitted from any logged paths, to make the logs easier to read.
- * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
- *     Otherwise, a file is copied if the source's last-modified time is greather than or
- *     equal to the target's last-modified time, or if the file sizes are different.
- * @param {loggingCallback} [log] Optional logging callback that takes a string message
- *     describing any file operations that are performed.
- * @return {boolean} true if any changes were made, or false if the force flag is not set
- *     and everything was up to date
- */
-function updatePath(sourcePath, targetPath, options, log) {
-    if (sourcePath !== null && typeof sourcePath !== "string") {
-        throw new Error("A source path (or null) is required.");
-    }
-
-    if (!targetPath || typeof targetPath !== "string") {
-        throw new Error("A target path is required.");
-    }
-
-    log = log || function(message) { };
-
-    return updatePathInternal(sourcePath, targetPath, options, log);
-}
-
-/**
- * Updates files and directories based on a mapping from target paths to source paths. Targets
- * with null sources in the map are deleted.
- *
- * @param {Object} pathMap A dictionary mapping from target paths to source paths.
- * @param {Object} [options] Optional additional parameters for the update.
- * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
- *     and source path parameters are relative; may be omitted if the paths are absolute. The
- *     rootDir is always omitted from any logged paths, to make the logs easier to read.
- * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
- *     Otherwise, a file is copied if the source's last-modified time is greather than or
- *     equal to the target's last-modified time, or if the file sizes are different.
- * @param {loggingCallback} [log] Optional logging callback that takes a string message
- *     describing any file operations that are performed.
- * @return {boolean} true if any changes were made, or false if the force flag is not set
- *     and everything was up to date
- */
-function updatePaths(pathMap, options, log) {
-    if (!pathMap || typeof pathMap !== "object" || Array.isArray(pathMap)) {
-        throw new Error("An object mapping from target paths to source paths is required.");
-    }
-
-    log = log || function(message) { };
-
-    var updated = false;
-
-    // Iterate in sorted order to ensure directories are created before files under them.
-    Object.keys(pathMap).sort().forEach(function (targetPath) {
-        var sourcePath = pathMap[targetPath];
-        updated = updatePathInternal(sourcePath, targetPath, options, log) || updated;
-    });
-
-    return updated;
-}
-
-/**
- * Updates a target directory with merged files and subdirectories from source directories.
- *
- * @param {string|string[]} sourceDirs Required source directory or array of source directories
- *     to be merged into the target. The directories are listed in order of precedence; files in
- *     directories later in the array supersede files in directories earlier in the array
- *     (regardless of timestamps).
- * @param {string} targetDir Required destination directory to be updated. If it does not exist,
- *     it will be created. If it exists, newer files from source directories will be copied over,
- *     and files missing in the source directories will be deleted.
- * @param {Object} [options] Optional additional parameters for the update.
- * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
- *     and source path parameters are relative; may be omitted if the paths are absolute. The
- *     rootDir is always omitted from any logged paths, to make the logs easier to read.
- * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
- *     Otherwise, a file is copied if the source's last-modified time is greather than or
- *     equal to the target's last-modified time, or if the file sizes are different.
- * @param {string|string[]} [options.include] Optional glob string or array of glob strings that
- *     are tested against both target and source relative paths to determine if they are included
- *     in the merge-and-update. If unspecified, all items are included.
- * @param {string|string[]} [options.exclude] Optional glob string or array of glob strings that
- *     are tested against both target and source relative paths to determine if they are excluded
- *     from the merge-and-update. Exclusions override inclusions. If unspecified, no items are
- *     excluded.
- * @param {loggingCallback} [log] Optional logging callback that takes a string message
- *     describing any file operations that are performed.
- * @return {boolean} true if any changes were made, or false if the force flag is not set
- *     and everything was up to date
- */
-function mergeAndUpdateDir(sourceDirs, targetDir, options, log) {
-    if (sourceDirs && typeof sourceDirs === "string") {
-        sourceDirs = [ sourceDirs ];
-    } else if (!Array.isArray(sourceDirs)) {
-        throw new Error("A source directory path or array of paths is required.");
-    }
-
-    if (!targetDir || typeof targetDir !== "string") {
-        throw new Error("A target directory path is required.");
-    }
-
-    log = log || function(message) { };
-
-    var rootDir = (options && options.rootDir) || "";
-
-    var include = (options && options.include) || [ "**" ];
-    if (typeof include === "string") {
-        include = [ include ];
-    } else if (!Array.isArray(include)) {
-        throw new Error("Include parameter must be a glob string or array of glob strings.");
-    }
-
-    var exclude = (options && options.exclude) || [];
-    if (typeof exclude === "string") {
-        exclude = [ exclude ];
-    } else if (!Array.isArray(exclude)) {
-        throw new Error("Exclude parameter must be a glob string or array of glob strings.");
-    }
-
-    // Scan the files in each of the source directories.
-    var sourceMaps = [];
-    for (var i in sourceDirs) {
-        var sourceFullPath = path.join(rootDir, sourceDirs[i]);
-        if (!fs.existsSync(sourceFullPath)) {
-            throw new Error("Source directory does not exist: " + sourceDirs[i]);
-        }
-        sourceMaps[i] = mapDirectory(rootDir, sourceDirs[i], include, exclude);
-    }
-
-    // Scan the files in the target directory, if it exists.
-    var targetMap = {};
-    var targetFullPath = path.join(rootDir, targetDir);
-    if (fs.existsSync(targetFullPath)) {
-        targetMap = mapDirectory(rootDir, targetDir, include, exclude);
-    }
-
-    var pathMap = mergePathMaps(sourceMaps, targetMap, targetDir);
-
-    var updated = false;
-
-    // Iterate in sorted order to ensure directories are created before files under them.
-    Object.keys(pathMap).sort().forEach(function (subPath) {
-        var entry = pathMap[subPath];
-        updated = updatePathWithStats(
-            entry.sourcePath,
-            entry.sourceStats,
-            entry.targetPath,
-            entry.targetStats,
-            options,
-            log) || updated;
-    });
-
-    return updated;
-}
-
-/**
- * Creates a dictionary map of all files and directories under a path.
- */
-function mapDirectory(rootDir, subDir, include, exclude) {
-    var dirMap = { "": { subDir: subDir, stats: fs.statSync(path.join(rootDir, subDir)) } };
-    mapSubdirectory(rootDir, subDir, "", include, exclude, dirMap);
-    return dirMap;
-
-    function mapSubdirectory(rootDir, subDir, relativeDir, include, exclude, dirMap) {
-        var itemMapped = false;
-        var items = fs.readdirSync(path.join(rootDir, subDir, relativeDir));
-        for (var i in items) {
-            var relativePath = path.join(relativeDir, items[i]);
-
-            // Skip any files or directories (and everything under) that match an exclude glob.
-            if (matchGlobArray(relativePath, exclude)) {
-                continue;
-            }
-
-            // Stats obtained here (required at least to know where to recurse in directories)
-            // are saved for later, where the modified times may also be used. This minimizes
-            // the number of file I/O operations performed.
-            var fullPath = path.join(rootDir, subDir, relativePath);
-            var stats = fs.statSync(fullPath);
-
-            if (stats.isDirectory()) {
-                // Directories are included if either something under them is included or they
-                // match an include glob.
-                if (mapSubdirectory(rootDir, subDir, relativePath, include, exclude, dirMap) ||
-                        matchGlobArray(relativePath, include)) {
-                    dirMap[relativePath] = { subDir: subDir, stats: stats };
-                    itemMapped = true;
-                }
-            } else if (stats.isFile()) {
-                // Files are included only if they match an include glob.
-                if (matchGlobArray(relativePath, include)) {
-                    dirMap[relativePath] = { subDir: subDir, stats: stats };
-                    itemMapped = true;
-                }
-            }
-        }
-        return itemMapped;
-    }
-
-    function matchGlobArray(path, globs) {
-        for (var i in globs) {
-            if (minimatch(path, globs[i])) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
-
-/**
- * Merges together multiple source maps and a target map into a single mapping from
- * relative paths to objects with target and source paths and stats.
- */
-function mergePathMaps(sourceMaps, targetMap, targetDir) {
-    // Merge multiple source maps together, along with target path info.
-    // Entries in later source maps override those in earlier source maps.
-    // Target stats will be filled in below for targets that exist.
-    var pathMap = {};
-    sourceMaps.forEach(function (sourceMap) {
-        for (var sourceSubPath in sourceMap) {
-            var sourceEntry = sourceMap[sourceSubPath];
-            pathMap[sourceSubPath] = {
-                targetPath: path.join(targetDir, sourceSubPath),
-                targetStats: null,
-                sourcePath: path.join(sourceEntry.subDir, sourceSubPath),
-                sourceStats: sourceEntry.stats
-            };
-        }
-    });
-
-    // Fill in target stats for targets that exist, and create entries
-    // for targets that don't have any corresponding sources.
-    for (var subPath in targetMap) {
-        var entry = pathMap[subPath];
-        if (entry) {
-            entry.targetStats = targetMap[subPath].stats;
-        } else {
-            pathMap[subPath] = {
-                targetPath: path.join(targetDir, subPath),
-                targetStats: targetMap[subPath].stats,
-                sourcePath: null,
-                sourceStats: null
-            };
-        }
-    }
-
-    return pathMap;
-}
-
-module.exports = {
-    updatePath: updatePath,
-    updatePaths: updatePaths,
-    mergeAndUpdateDir: mergeAndUpdateDir
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/PlatformJson.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/PlatformJson.js b/node_modules/cordova-common/src/PlatformJson.js
deleted file mode 100644
index 4e2b287..0000000
--- a/node_modules/cordova-common/src/PlatformJson.js
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * 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.
- *
-*/
-/* jshint sub:true */
-
-var fs = require('fs');
-var path = require('path');
-var shelljs = require('shelljs');
-var mungeutil = require('./ConfigChanges/munge-util');
-var pluginMappernto = require('cordova-registry-mapper').newToOld;
-var pluginMapperotn = require('cordova-registry-mapper').oldToNew;
-
-function PlatformJson(filePath, platform, root) {
-    this.filePath = filePath;
-    this.platform = platform;
-    this.root = fix_munge(root || {});
-}
-
-PlatformJson.load = function(plugins_dir, platform) {
-    var filePath = path.join(plugins_dir, platform + '.json');
-    var root = null;
-    if (fs.existsSync(filePath)) {
-        root = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
-    }
-    return new PlatformJson(filePath, platform, root);
-};
-
-PlatformJson.prototype.save = function() {
-    shelljs.mkdir('-p', path.dirname(this.filePath));
-    fs.writeFileSync(this.filePath, JSON.stringify(this.root, null, 4), 'utf-8');
-};
-
-/**
- * Indicates whether the specified plugin is installed as a top-level (not as
- *  dependency to others)
- * @method function
- * @param  {String} pluginId A plugin id to check for.
- * @return {Boolean} true if plugin installed as top-level, otherwise false.
- */
-PlatformJson.prototype.isPluginTopLevel = function(pluginId) {
-    var installedPlugins = this.root.installed_plugins;
-    return installedPlugins[pluginId] ||
-        installedPlugins[pluginMappernto[pluginId]] ||
-        installedPlugins[pluginMapperotn[pluginId]];
-};
-
-/**
- * Indicates whether the specified plugin is installed as a dependency to other
- *  plugin.
- * @method function
- * @param  {String} pluginId A plugin id to check for.
- * @return {Boolean} true if plugin installed as a dependency, otherwise false.
- */
-PlatformJson.prototype.isPluginDependent = function(pluginId) {
-    var dependentPlugins = this.root.dependent_plugins;
-    return dependentPlugins[pluginId] ||
-        dependentPlugins[pluginMappernto[pluginId]] ||
-        dependentPlugins[pluginMapperotn[pluginId]];
-};
-
-/**
- * Indicates whether plugin is installed either as top-level or as dependency.
- * @method function
- * @param  {String} pluginId A plugin id to check for.
- * @return {Boolean} true if plugin installed, otherwise false.
- */
-PlatformJson.prototype.isPluginInstalled = function(pluginId) {
-    return this.isPluginTopLevel(pluginId) ||
-        this.isPluginDependent(pluginId);
-};
-
-PlatformJson.prototype.addPlugin = function(pluginId, variables, isTopLevel) {
-    var pluginsList = isTopLevel ?
-        this.root.installed_plugins :
-        this.root.dependent_plugins;
-
-    pluginsList[pluginId] = variables;
-
-    return this;
-};
-
-/**
- * @chaining
- * Generates and adds metadata for provided plugin into associated <platform>.json file
- *
- * @param   {PluginInfo}  pluginInfo  A pluginInfo instance to add metadata from
- * @returns {this} Current PlatformJson instance to allow calls chaining
- */
-PlatformJson.prototype.addPluginMetadata = function (pluginInfo) {
-
-    var installedModules = this.root.modules || [];
-
-    var installedPaths = installedModules.map(function (installedModule) {
-        return installedModule.file;
-    });
-
-    var modulesToInstall = pluginInfo.getJsModules(this.platform)
-    .map(function (module) {
-        return new ModuleMetadata(pluginInfo.id, module);
-    })
-    .filter(function (metadata) {
-        // Filter out modules which are already added to metadata
-        return installedPaths.indexOf(metadata.file) === -1;
-    });
-
-    this.root.modules = installedModules.concat(modulesToInstall);
-
-    this.root.plugin_metadata = this.root.plugin_metadata || {};
-    this.root.plugin_metadata[pluginInfo.id] = pluginInfo.version;
-
-    return this;
-};
-
-PlatformJson.prototype.removePlugin = function(pluginId, isTopLevel) {
-    var pluginsList = isTopLevel ?
-        this.root.installed_plugins :
-        this.root.dependent_plugins;
-
-    delete pluginsList[pluginId];
-
-    return this;
-};
-
-/**
- * @chaining
- * Removes metadata for provided plugin from associated file
- *
- * @param   {PluginInfo}  pluginInfo A PluginInfo instance to which modules' metadata
- *   we need to remove
- *
- * @returns {this} Current PlatformJson instance to allow calls chaining
- */
-PlatformJson.prototype.removePluginMetadata = function (pluginInfo) {
-    var modulesToRemove = pluginInfo.getJsModules(this.platform)
-    .map(function (jsModule) {
-        return  ['plugins', pluginInfo.id, jsModule.src].join('/');
-    });
-
-    var installedModules = this.root.modules || [];
-    this.root.modules = installedModules
-    .filter(function (installedModule) {
-        // Leave only those metadatas which 'file' is not in removed modules
-        return (modulesToRemove.indexOf(installedModule.file) === -1);
-    });
-
-    if (this.root.plugin_metadata) {
-        delete this.root.plugin_metadata[pluginInfo.id];
-    }
-
-    return this;
-};
-
-PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level) {
-    this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level});
-};
-
-PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function(pluginId, is_top_level) {
-    this.root.prepare_queue.uninstalled.push({'plugin':pluginId, 'id':pluginId, 'topLevel':is_top_level});
-};
-
-/**
- * Moves plugin, specified by id to top-level plugins. If plugin is top-level
- *  already, then does nothing.
- * @method function
- * @param  {String} pluginId A plugin id to make top-level.
- * @return {PlatformJson} PlatformJson instance.
- */
-PlatformJson.prototype.makeTopLevel = function(pluginId) {
-    var plugin = this.root.dependent_plugins[pluginId];
-    if (plugin) {
-        delete this.root.dependent_plugins[pluginId];
-        this.root.installed_plugins[pluginId] = plugin;
-    }
-    return this;
-};
-
-/**
- * Generates a metadata for all installed plugins and js modules. The resultant
- *   string is ready to be written to 'cordova_plugins.js'
- *
- * @returns {String} cordova_plugins.js contents
- */
-PlatformJson.prototype.generateMetadata = function () {
-    return [
-        'cordova.define(\'cordova/plugin_list\', function(require, exports, module) {',
-        'module.exports = ' + JSON.stringify(this.root.modules, null, 4) + ';',
-        'module.exports.metadata = ',
-        '// TOP OF METADATA',
-        JSON.stringify(this.root.plugin_metadata, null, 4) + ';',
-        '// BOTTOM OF METADATA',
-        '});' // Close cordova.define.
-    ].join('\n');
-};
-
-/**
- * @chaining
- * Generates and then saves metadata to specified file. Doesn't check if file exists.
- *
- * @param {String} destination  File metadata will be written to
- * @return {PlatformJson} PlatformJson instance
- */
-PlatformJson.prototype.generateAndSaveMetadata = function (destination) {
-    var meta = this.generateMetadata();
-    shelljs.mkdir('-p', path.dirname(destination));
-    fs.writeFileSync(destination, meta, 'utf-8');
-
-    return this;
-};
-
-// convert a munge from the old format ([file][parent][xml] = count) to the current one
-function fix_munge(root) {
-    root.prepare_queue = root.prepare_queue || {installed:[], uninstalled:[]};
-    root.config_munge = root.config_munge || {files: {}};
-    root.installed_plugins = root.installed_plugins || {};
-    root.dependent_plugins = root.dependent_plugins || {};
-
-    var munge = root.config_munge;
-    if (!munge.files) {
-        var new_munge = { files: {} };
-        for (var file in munge) {
-            for (var selector in munge[file]) {
-                for (var xml_child in munge[file][selector]) {
-                    var val = parseInt(munge[file][selector][xml_child]);
-                    for (var i = 0; i < val; i++) {
-                        mungeutil.deep_add(new_munge, [file, selector, { xml: xml_child, count: val }]);
-                    }
-                }
-            }
-        }
-        root.config_munge = new_munge;
-    }
-
-    return root;
-}
-
-/**
- * @constructor
- * @class ModuleMetadata
- *
- * Creates a ModuleMetadata object that represents module entry in 'cordova_plugins.js'
- *   file at run time
- *
- * @param {String}  pluginId  Plugin id where this module installed from
- * @param (JsModule|Object)  jsModule  A js-module entry from PluginInfo class to generate metadata for
- */
-function ModuleMetadata (pluginId, jsModule) {
-
-    if (!pluginId) throw new TypeError('pluginId argument must be a valid plugin id');
-    if (!jsModule.src && !jsModule.name) throw new TypeError('jsModule argument must contain src or/and name properties');
-
-    this.id  = pluginId + '.' + ( jsModule.name || jsModule.src.match(/([^\/]+)\.js/)[1] );
-    this.file = ['plugins', pluginId, jsModule.src].join('/');
-    this.pluginId = pluginId;
-
-    if (jsModule.clobbers && jsModule.clobbers.length > 0) {
-        this.clobbers = jsModule.clobbers.map(function(o) { return o.target; });
-    }
-    if (jsModule.merges && jsModule.merges.length > 0) {
-        this.merges = jsModule.merges.map(function(o) { return o.target; });
-    }
-    if (jsModule.runs) {
-        this.runs = true;
-    }
-}
-
-module.exports = PlatformJson;
-

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/PluginInfo/PluginInfo.js b/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
deleted file mode 100644
index 77199ec..0000000
--- a/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
+++ /dev/null
@@ -1,406 +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.
-*/
-
-/* jshint sub:true, laxcomma:true, laxbreak:true */
-
-/*
-A class for holidng the information currently stored in plugin.xml
-It should also be able to answer questions like whether the plugin
-is compatible with a given engine version.
-
-TODO (kamrik): refactor this to not use sync functions and return promises.
-*/
-
-
-var path = require('path')
-  , fs = require('fs')
-  , xml_helpers = require('../util/xml-helpers')
-  , CordovaError = require('../CordovaError/CordovaError')
-  ;
-
-function PluginInfo(dirname) {
-    var self = this;
-
-    // METHODS
-    // Defined inside the constructor to avoid the "this" binding problems.
-
-    // <preference> tag
-    // Example: <preference name="API_KEY" />
-    // Used to require a variable to be specified via --variable when installing the plugin.
-    // returns { key : default | null}
-    self.getPreferences = getPreferences;
-    function getPreferences(platform) {
-        return _getTags(self._et, 'preference', platform, _parsePreference)
-        .reduce(function (preferences, pref) {
-            preferences[pref.preference] = pref.default;
-            return preferences;
-        }, {});
-    }
-
-    function _parsePreference(prefTag) {
-        var name = prefTag.attrib.name.toUpperCase();
-        var def = prefTag.attrib.default || null;
-        return {preference: name, default: def};
-    }
-
-    // <asset>
-    self.getAssets = getAssets;
-    function getAssets(platform) {
-        var assets = _getTags(self._et, 'asset', platform, _parseAsset);
-        return assets;
-    }
-
-    function _parseAsset(tag) {
-        var src = tag.attrib.src;
-        var target = tag.attrib.target;
-
-        if ( !src || !target) {
-            var msg =
-                'Malformed <asset> tag. Both "src" and "target" attributes'
-                + 'must be specified in\n'
-                + self.filepath
-                ;
-            throw new Error(msg);
-        }
-
-        var asset = {
-            itemType: 'asset',
-            src: src,
-            target: target
-        };
-        return asset;
-    }
-
-
-    // <dependency>
-    // Example:
-    // <dependency id="com.plugin.id"
-    //     url="https://github.com/myuser/someplugin"
-    //     commit="428931ada3891801"
-    //     subdir="some/path/here" />
-    self.getDependencies = getDependencies;
-    function getDependencies(platform) {
-        var deps = _getTags(
-                self._et,
-                'dependency',
-                platform,
-                _parseDependency
-        );
-        return deps;
-    }
-
-    function _parseDependency(tag) {
-        var dep =
-            { id : tag.attrib.id
-            , url : tag.attrib.url || ''
-            , subdir : tag.attrib.subdir || ''
-            , commit : tag.attrib.commit
-            };
-
-        dep.git_ref = dep.commit;
-
-        if ( !dep.id ) {
-            var msg =
-                '<dependency> tag is missing id attribute in '
-                + self.filepath
-                ;
-            throw new CordovaError(msg);
-        }
-        return dep;
-    }
-
-
-    // <config-file> tag
-    self.getConfigFiles = getConfigFiles;
-    function getConfigFiles(platform) {
-        var configFiles = _getTags(self._et, 'config-file', platform, _parseConfigFile);
-        return configFiles;
-    }
-
-    function _parseConfigFile(tag) {
-        var configFile =
-            { target : tag.attrib['target']
-            , parent : tag.attrib['parent']
-            , after : tag.attrib['after']
-            , xmls : tag.getchildren()
-            // To support demuxing via versions
-            , versions : tag.attrib['versions']
-            , deviceTarget: tag.attrib['device-target']
-            };
-        return configFile;
-    }
-
-    // <info> tags, both global and within a <platform>
-    // TODO (kamrik): Do we ever use <info> under <platform>? Example wanted.
-    self.getInfo = getInfo;
-    function getInfo(platform) {
-        var infos = _getTags(
-                self._et,
-                'info',
-                platform,
-                function(elem) { return elem.text; }
-        );
-        // Filter out any undefined or empty strings.
-        infos = infos.filter(Boolean);
-        return infos;
-    }
-
-    // <source-file>
-    // Examples:
-    // <source-file src="src/ios/someLib.a" framework="true" />
-    // <source-file src="src/ios/someLib.a" compiler-flags="-fno-objc-arc" />
-    self.getSourceFiles = getSourceFiles;
-    function getSourceFiles(platform) {
-        var sourceFiles = _getTagsInPlatform(self._et, 'source-file', platform, _parseSourceFile);
-        return sourceFiles;
-    }
-
-    function _parseSourceFile(tag) {
-        return {
-            itemType: 'source-file',
-            src: tag.attrib.src,
-            framework: isStrTrue(tag.attrib.framework),
-            weak: isStrTrue(tag.attrib.weak),
-            compilerFlags: tag.attrib['compiler-flags'],
-            targetDir: tag.attrib['target-dir']
-        };
-    }
-
-    // <header-file>
-    // Example:
-    // <header-file src="CDVFoo.h" />
-    self.getHeaderFiles = getHeaderFiles;
-    function getHeaderFiles(platform) {
-        var headerFiles = _getTagsInPlatform(self._et, 'header-file', platform, function(tag) {
-            return {
-                itemType: 'header-file',
-                src: tag.attrib.src,
-                targetDir: tag.attrib['target-dir']
-            };
-        });
-        return headerFiles;
-    }
-
-    // <resource-file>
-    // Example:
-    // <resource-file src="FooPluginStrings.xml" target="res/values/FooPluginStrings.xml" device-target="win" arch="x86" versions="&gt;=8.1" />
-    self.getResourceFiles = getResourceFiles;
-    function getResourceFiles(platform) {
-        var resourceFiles = _getTagsInPlatform(self._et, 'resource-file', platform, function(tag) {
-            return {
-                itemType: 'resource-file',
-                src: tag.attrib.src,
-                target: tag.attrib.target,
-                versions: tag.attrib.versions,
-                deviceTarget: tag.attrib['device-target'],
-                arch: tag.attrib.arch
-            };
-        });
-        return resourceFiles;
-    }
-
-    // <lib-file>
-    // Example:
-    // <lib-file src="src/BlackBerry10/native/device/libfoo.so" arch="device" />
-    self.getLibFiles = getLibFiles;
-    function getLibFiles(platform) {
-        var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, function(tag) {
-            return {
-                itemType: 'lib-file',
-                src: tag.attrib.src,
-                arch: tag.attrib.arch,
-                Include: tag.attrib.Include,
-                versions: tag.attrib.versions,
-                deviceTarget: tag.attrib['device-target'] || tag.attrib.target
-            };
-        });
-        return libFiles;
-    }
-
-    // <hook>
-    // Example:
-    // <hook type="before_build" src="scripts/beforeBuild.js" />
-    self.getHookScripts = getHookScripts;
-    function getHookScripts(hook, platforms) {
-        var scriptElements =  self._et.findall('./hook');
-
-        if(platforms) {
-            platforms.forEach(function (platform) {
-                scriptElements = scriptElements.concat(self._et.findall('./platform[@name="' + platform + '"]/hook'));
-            });
-        }
-
-        function filterScriptByHookType(el) {
-            return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook;
-        }
-
-        return scriptElements.filter(filterScriptByHookType);
-    }
-
-    self.getJsModules = getJsModules;
-    function getJsModules(platform) {
-        var modules = _getTags(self._et, 'js-module', platform, _parseJsModule);
-        return modules;
-    }
-
-    function _parseJsModule(tag) {
-        var ret = {
-            itemType: 'js-module',
-            name: tag.attrib.name,
-            src: tag.attrib.src,
-            clobbers: tag.findall('clobbers').map(function(tag) { return { target: tag.attrib.target }; }),
-            merges: tag.findall('merges').map(function(tag) { return { target: tag.attrib.target }; }),
-            runs: tag.findall('runs').length > 0
-        };
-
-        return ret;
-    }
-
-    self.getEngines = function() {
-        return self._et.findall('engines/engine').map(function(n) {
-            return {
-                name: n.attrib.name,
-                version: n.attrib.version,
-                platform: n.attrib.platform,
-                scriptSrc: n.attrib.scriptSrc
-            };
-        });
-    };
-
-    self.getPlatforms = function() {
-        return self._et.findall('platform').map(function(n) {
-            return { name: n.attrib.name };
-        });
-    };
-
-    self.getPlatformsArray = function() {
-        return self._et.findall('platform').map(function(n) {
-            return n.attrib.name;
-        });
-    };
-    self.getFrameworks = function(platform) {
-        return _getTags(self._et, 'framework', platform, function(el) {
-            var ret = {
-                itemType: 'framework',
-                type: el.attrib.type,
-                parent: el.attrib.parent,
-                custom: isStrTrue(el.attrib.custom),
-                src: el.attrib.src,
-                weak: isStrTrue(el.attrib.weak),
-                versions: el.attrib.versions,
-                targetDir: el.attrib['target-dir'],
-                deviceTarget: el.attrib['device-target'] || el.attrib.target,
-                arch: el.attrib.arch
-            };
-            return ret;
-        });
-    };
-
-    self.getFilesAndFrameworks = getFilesAndFrameworks;
-    function getFilesAndFrameworks(platform) {
-        // Please avoid changing the order of the calls below, files will be
-        // installed in this order.
-        var items = [].concat(
-            self.getSourceFiles(platform),
-            self.getHeaderFiles(platform),
-            self.getResourceFiles(platform),
-            self.getFrameworks(platform),
-            self.getLibFiles(platform)
-        );
-        return items;
-    }
-    ///// End of PluginInfo methods /////
-
-
-    ///// PluginInfo Constructor logic  /////
-    self.filepath = path.join(dirname, 'plugin.xml');
-    if (!fs.existsSync(self.filepath)) {
-        throw new CordovaError('Cannot find plugin.xml for plugin "' + path.basename(dirname) + '". Please try adding it again.');
-    }
-
-    self.dir = dirname;
-    var et = self._et = xml_helpers.parseElementtreeSync(self.filepath);
-    var pelem = et.getroot();
-    self.id = pelem.attrib.id;
-    self.version = pelem.attrib.version;
-
-    // Optional fields
-    self.name = pelem.findtext('name');
-    self.description = pelem.findtext('description');
-    self.license = pelem.findtext('license');
-    self.repo = pelem.findtext('repo');
-    self.issue = pelem.findtext('issue');
-    self.keywords = pelem.findtext('keywords');
-    self.info = pelem.findtext('info');
-    if (self.keywords) {
-        self.keywords = self.keywords.split(',').map( function(s) { return s.trim(); } );
-    }
-    self.getKeywordsAndPlatforms = function () {
-        var ret = self.keywords || [];
-        return ret.concat('ecosystem:cordova').concat(addCordova(self.getPlatformsArray()));
-    };
-}  // End of PluginInfo constructor.
-
-// Helper function used to prefix every element of an array with cordova-
-// Useful when we want to modify platforms to be cordova-platform
-function addCordova(someArray) {
-    var newArray = someArray.map(function(element) {
-        return 'cordova-' + element;
-    });
-    return newArray;
-}
-
-// Helper function used by most of the getSomething methods of PluginInfo.
-// Get all elements of a given name. Both in root and in platform sections
-// for the given platform. If transform is given and is a function, it is
-// applied to each element.
-function _getTags(pelem, tag, platform, transform) {
-    var platformTag = pelem.find('./platform[@name="' + platform + '"]');
-    var tagsInRoot = pelem.findall(tag);
-    tagsInRoot = tagsInRoot || [];
-    var tagsInPlatform = platformTag ? platformTag.findall(tag) : [];
-    var tags = tagsInRoot.concat(tagsInPlatform);
-    if ( typeof transform === 'function' ) {
-        tags = tags.map(transform);
-    }
-    return tags;
-}
-
-// Same as _getTags() but only looks inside a platfrom section.
-function _getTagsInPlatform(pelem, tag, platform, transform) {
-    var platformTag = pelem.find('./platform[@name="' + platform + '"]');
-    var tags = platformTag ? platformTag.findall(tag) : [];
-    if ( typeof transform === 'function' ) {
-        tags = tags.map(transform);
-    }
-    return tags;
-}
-
-// Check if x is a string 'true'.
-function isStrTrue(x) {
-    return String(x).toLowerCase() == 'true';
-}
-
-module.exports = PluginInfo;
-// Backwards compat:
-PluginInfo.PluginInfo = PluginInfo;
-PluginInfo.loadPluginsDir = function(dir) {
-    var PluginInfoProvider = require('./PluginInfoProvider');
-    return new PluginInfoProvider().getAllWithinSearchPath(dir);
-};

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js b/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
deleted file mode 100644
index 6240119..0000000
--- a/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
+++ /dev/null
@@ -1,82 +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.
-*/
-
-/* jshint sub:true, laxcomma:true, laxbreak:true */
-
-var fs = require('fs');
-var path = require('path');
-var PluginInfo = require('./PluginInfo');
-var events = require('../events');
-
-function PluginInfoProvider() {
-    this._cache = {};
-    this._getAllCache = {};
-}
-
-PluginInfoProvider.prototype.get = function(dirName) {
-    var absPath = path.resolve(dirName);
-    if (!this._cache[absPath]) {
-        this._cache[absPath] = new PluginInfo(dirName);
-    }
-    return this._cache[absPath];
-};
-
-// Normally you don't need to put() entries, but it's used
-// when copying plugins, and in unit tests.
-PluginInfoProvider.prototype.put = function(pluginInfo) {
-    var absPath = path.resolve(pluginInfo.dir);
-    this._cache[absPath] = pluginInfo;
-};
-
-// Used for plugin search path processing.
-// Given a dir containing multiple plugins, create a PluginInfo object for
-// each of them and return as array.
-// Should load them all in parallel and return a promise, but not yet.
-PluginInfoProvider.prototype.getAllWithinSearchPath = function(dirName) {
-    var absPath = path.resolve(dirName);
-    if (!this._getAllCache[absPath]) {
-        this._getAllCache[absPath] = getAllHelper(absPath, this);
-    }
-    return this._getAllCache[absPath];
-};
-
-function getAllHelper(absPath, provider) {
-    if (!fs.existsSync(absPath)){
-        return [];
-    }
-    // If dir itself is a plugin, return it in an array with one element.
-    if (fs.existsSync(path.join(absPath, 'plugin.xml'))) {
-        return [provider.get(absPath)];
-    }
-    var subdirs = fs.readdirSync(absPath);
-    var plugins = [];
-    subdirs.forEach(function(subdir) {
-        var d = path.join(absPath, subdir);
-        if (fs.existsSync(path.join(d, 'plugin.xml'))) {
-            try {
-                plugins.push(provider.get(d));
-            } catch (e) {
-                events.emit('warn', 'Error parsing ' + path.join(d, 'plugin.xml.\n' + e.stack));
-            }
-        }
-    });
-    return plugins;
-}
-
-module.exports = PluginInfoProvider;

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/PluginManager.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/PluginManager.js b/node_modules/cordova-common/src/PluginManager.js
deleted file mode 100644
index deeb92f..0000000
--- a/node_modules/cordova-common/src/PluginManager.js
+++ /dev/null
@@ -1,152 +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 Q = require('q');
-var fs = require('fs');
-var path = require('path');
-
-var ActionStack = require('./ActionStack');
-var PlatformJson = require('./PlatformJson');
-var CordovaError = require('./CordovaError/CordovaError');
-var PlatformMunger = require('./ConfigChanges/ConfigChanges').PlatformMunger;
-var PluginInfoProvider = require('./PluginInfo/PluginInfoProvider');
-
-/**
- * @constructor
- * @class PluginManager
- * Represents an entity for adding/removing plugins for platforms
- *
- * @param {String} platform Platform name
- * @param {Object} locations - Platform files and directories
- * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from
- */
-function PluginManager(platform, locations, ideProject) {
-    this.platform = platform;
-    this.locations = locations;
-    this.project = ideProject;
-
-    var platformJson = PlatformJson.load(locations.root, platform);
-    this.munger = new PlatformMunger(platform, locations.root, platformJson, new PluginInfoProvider());
-}
-
-
-/**
- * @constructs PluginManager
- * A convenience shortcut to new PluginManager(...)
- *
- * @param {String} platform Platform name
- * @param {Object} locations - Platform files and directories
- * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from
- * @returns new PluginManager instance
- */
-PluginManager.get = function(platform, locations, ideProject) {
-    return new PluginManager(platform, locations, ideProject);
-};
-
-PluginManager.INSTALL = 'install';
-PluginManager.UNINSTALL = 'uninstall';
-
-module.exports = PluginManager;
-
-/**
- * Describes and implements common plugin installation/uninstallation routine. The flow is the following:
- *  * Validate and set defaults for options. Note that options are empty by default. Everything
- *    needed for platform IDE project must be passed from outside. Plugin variables (which
- *    are the part of the options) also must be already populated with 'PACKAGE_NAME' variable.
- *  * Collect all plugin's native and web files, get installers/uninstallers and process
- *    all these via ActionStack.
- *  * Save the IDE project, so the changes made by installers are persisted.
- *  * Generate config changes munge for plugin and apply it to all required files
- *  * Generate metadata for plugin and plugin modules and save it to 'cordova_plugins.js'
- *
- * @param {PluginInfo} plugin A PluginInfo structure representing plugin to install
- * @param {Object} [options={}] An installation options. It is expected but is not necessary
- *   that options would contain 'variables' inner object with 'PACKAGE_NAME' field set by caller.
- *
- * @returns {Promise} Returns a Q promise, either resolved in case of success, rejected otherwise.
- */
-PluginManager.prototype.doOperation = function (operation, plugin, options) {
-    if (operation !== PluginManager.INSTALL && operation !== PluginManager.UNINSTALL)
-        return Q.reject(new CordovaError('The parameter is incorrect. The opeation must be either "add" or "remove"'));
-
-    if (!plugin || plugin.constructor.name !== 'PluginInfo')
-        return Q.reject(new CordovaError('The parameter is incorrect. The first parameter should be a PluginInfo instance'));
-
-    // Set default to empty object to play safe when accesing properties
-    options = options || {};
-
-    var self = this;
-    var actions = new ActionStack();
-
-    // gather all files need to be handled during operation ...
-    plugin.getFilesAndFrameworks(this.platform)
-        .concat(plugin.getAssets(this.platform))
-        .concat(plugin.getJsModules(this.platform))
-    // ... put them into stack ...
-    .forEach(function(item) {
-        var installer = self.project.getInstaller(item.itemType);
-        var uninstaller = self.project.getUninstaller(item.itemType);
-        var actionArgs = [item, plugin, self.project, options];
-
-        var action;
-        if (operation === PluginManager.INSTALL) {
-            action = actions.createAction.apply(actions, [installer, actionArgs, uninstaller, actionArgs]);
-        } else /* op === PluginManager.UNINSTALL */{
-            action = actions.createAction.apply(actions, [uninstaller, actionArgs, installer, actionArgs]);
-        }
-        actions.push(action);
-    });
-
-    // ... and run through the action stack
-    return actions.process(this.platform)
-    .then(function () {
-        if (self.project.write) {
-            self.project.write();
-        }
-
-        if (operation === PluginManager.INSTALL) {
-            // Ignore passed `is_top_level` option since platform itself doesn't know
-            // anything about managing dependencies - it's responsibility of caller.
-            self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true);
-            self.munger.platformJson.addPluginMetadata(plugin);
-        } else {
-            self.munger.remove_plugin_changes(plugin, /*is_top_level=*/true);
-            self.munger.platformJson.removePluginMetadata(plugin);
-        }
-
-        // Save everything (munge and plugin/modules metadata)
-        self.munger.save_all();
-
-        var metadata = self.munger.platformJson.generateMetadata();
-        fs.writeFileSync(path.join(self.locations.www, 'cordova_plugins.js'), metadata, 'utf-8');
-
-        // CB-11022 save plugin metadata to both www and platform_www if options.usePlatformWww is specified
-        if (options.usePlatformWww) {
-            fs.writeFileSync(path.join(self.locations.platformWww, 'cordova_plugins.js'), metadata, 'utf-8');
-        }
-    });
-};
-
-PluginManager.prototype.addPlugin = function (plugin, installOptions) {
-    return this.doOperation(PluginManager.INSTALL, plugin, installOptions);
-};
-
-PluginManager.prototype.removePlugin = function (plugin, uninstallOptions) {
-    return this.doOperation(PluginManager.UNINSTALL, plugin, uninstallOptions);
-};

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/events.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/events.js b/node_modules/cordova-common/src/events.js
deleted file mode 100644
index e702bd8..0000000
--- a/node_modules/cordova-common/src/events.js
+++ /dev/null
@@ -1,72 +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 EventEmitter = require('events').EventEmitter;
-
-var INSTANCE = new EventEmitter();
-var EVENTS_RECEIVER;
-
-module.exports = INSTANCE;
-
-/**
- * Sets up current instance to forward emitted events to another EventEmitter
- *   instance.
- *
- * @param   {EventEmitter}  [eventEmitter]  The emitter instance to forward
- *   events to. Falsy value, when passed, disables forwarding.
- */
-module.exports.forwardEventsTo = function (eventEmitter) {
-
-    // If no argument is specified disable events forwarding
-    if (!eventEmitter) {
-        EVENTS_RECEIVER = undefined;
-        return;
-    }
-
-    if (!(eventEmitter instanceof EventEmitter))
-        throw new Error('Cordova events can be redirected to another EventEmitter instance only');
-
-    // CB-10940 Skipping forwarding to self to avoid infinite recursion.
-    // This is the case when the modules are npm-linked.
-    if (this !== eventEmitter) {
-        EVENTS_RECEIVER = eventEmitter;
-    } else {
-        // Reset forwarding if we are subscribing to self
-        EVENTS_RECEIVER = undefined;
-    }
-};
-
-var emit = INSTANCE.emit;
-
-/**
- * This method replaces original 'emit' method to allow events forwarding.
- *
- * @return  {eventEmitter}  Current instance to allow calls chaining, as
- *   original 'emit' does
- */
-module.exports.emit = function () {
-
-    var args = Array.prototype.slice.call(arguments);
-
-    if (EVENTS_RECEIVER) {
-        EVENTS_RECEIVER.emit.apply(EVENTS_RECEIVER, args);
-    }
-
-    return emit.apply(this, args);
-};

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/superspawn.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/superspawn.js b/node_modules/cordova-common/src/superspawn.js
deleted file mode 100644
index a3f1431..0000000
--- a/node_modules/cordova-common/src/superspawn.js
+++ /dev/null
@@ -1,184 +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 child_process = require('child_process');
-var fs = require('fs');
-var path = require('path');
-var _ = require('underscore');
-var Q = require('q');
-var shell = require('shelljs');
-var events = require('./events');
-var iswin32 = process.platform == 'win32';
-
-// On Windows, spawn() for batch files requires absolute path & having the extension.
-function resolveWindowsExe(cmd) {
-    var winExtensions = ['.exe', '.bat', '.cmd', '.js', '.vbs'];
-    function isValidExe(c) {
-        return winExtensions.indexOf(path.extname(c)) !== -1 && fs.existsSync(c);
-    }
-    if (isValidExe(cmd)) {
-        return cmd;
-    }
-    cmd = shell.which(cmd) || cmd;
-    if (!isValidExe(cmd)) {
-        winExtensions.some(function(ext) {
-            if (fs.existsSync(cmd + ext)) {
-                cmd = cmd + ext;
-                return true;
-            }
-        });
-    }
-    return cmd;
-}
-
-function maybeQuote(a) {
-    if (/^[^"].*[ &].*[^"]/.test(a)) return '"' + a + '"';
-    return a;
-}
-
-/**
- * A special implementation for child_process.spawn that handles
- *   Windows-specific issues with batch files and spaces in paths. Returns a
- *   promise that succeeds only for return code 0. It is also possible to
- *   subscribe on spawned process' stdout and stderr streams using progress
- *   handler for resultant promise.
- *
- * @example spawn('mycommand', [], {stdio: 'pipe'}) .progress(function (stdio){
- *   if (stdio.stderr) { console.error(stdio.stderr); } })
- *   .then(function(result){ // do other stuff })
- *
- * @param   {String}   cmd       A command to spawn
- * @param   {String[]} [args=[]]  An array of arguments, passed to spawned
- *   process
- * @param   {Object}   [opts={}]  A configuration object
- * @param   {String|String[]|Object} opts.stdio Property that configures how
- *   spawned process' stdio will behave. Has the same meaning and possible
- *   values as 'stdio' options for child_process.spawn method
- *   (https://nodejs.org/api/child_process.html#child_process_options_stdio).
- * @param {Object}     [env={}]  A map of extra environment variables
- * @param {String}     [cwd=process.cwd()]  Working directory for the command
- * @param {Boolean}    [chmod=false]  If truthy, will attempt to set the execute
- *   bit before executing on non-Windows platforms
- *
- * @return  {Promise}        A promise that is either fulfilled if the spawned
- *   process is exited with zero error code or rejected otherwise. If the
- *   'stdio' option set to 'default' or 'pipe', the promise also emits progress
- *   messages with the following contents:
- *   {
- *       'stdout': ...,
- *       'stderr': ...
- *   }
- */
-exports.spawn = function(cmd, args, opts) {
-    args = args || [];
-    opts = opts || {};
-    var spawnOpts = {};
-    var d = Q.defer();
-
-    if (iswin32) {
-        cmd = resolveWindowsExe(cmd);
-        // If we couldn't find the file, likely we'll end up failing,
-        // but for things like "del", cmd will do the trick.
-        if (path.extname(cmd) != '.exe') {
-            var cmdArgs = '"' + [cmd].concat(args).map(maybeQuote).join(' ') + '"';
-            // We need to use /s to ensure that spaces are parsed properly with cmd spawned content
-            args = [['/s', '/c', cmdArgs].join(' ')];
-            cmd = 'cmd';
-            spawnOpts.windowsVerbatimArguments = true;
-        } else if (!fs.existsSync(cmd)) {
-            // We need to use /s to ensure that spaces are parsed properly with cmd spawned content
-            args = ['/s', '/c', cmd].concat(args).map(maybeQuote);
-        }
-    }
-
-    if (opts.stdio !== 'default') {
-        // Ignore 'default' value for stdio because it corresponds to child_process's default 'pipe' option
-        spawnOpts.stdio = opts.stdio;
-    }
-
-    if (opts.cwd) {
-        spawnOpts.cwd = opts.cwd;
-    }
-
-    if (opts.env) {
-        spawnOpts.env = _.extend(_.extend({}, process.env), opts.env);
-    }
-
-    if (opts.chmod && !iswin32) {
-        try {
-            // This fails when module is installed in a system directory (e.g. via sudo npm install)
-            fs.chmodSync(cmd, '755');
-        } catch (e) {
-            // If the perms weren't set right, then this will come as an error upon execution.
-        }
-    }
-
-    events.emit(opts.printCommand ? 'log' : 'verbose', 'Running command: ' + maybeQuote(cmd) + ' ' + args.map(maybeQuote).join(' '));
-
-    var child = child_process.spawn(cmd, args, spawnOpts);
-    var capturedOut = '';
-    var capturedErr = '';
-
-    if (child.stdout) {
-        child.stdout.setEncoding('utf8');
-        child.stdout.on('data', function(data) {
-            capturedOut += data;
-            d.notify({'stdout': data});
-        });
-    }
-
-    if (child.stderr) {
-        child.stderr.setEncoding('utf8');
-        child.stderr.on('data', function(data) {
-            capturedErr += data;
-            d.notify({'stderr': data});
-        });
-    }
-
-    child.on('close', whenDone);
-    child.on('error', whenDone);
-    function whenDone(arg) {
-        child.removeListener('close', whenDone);
-        child.removeListener('error', whenDone);
-        var code = typeof arg == 'number' ? arg : arg && arg.code;
-
-        events.emit('verbose', 'Command finished with error code ' + code + ': ' + cmd + ' ' + args);
-        if (code === 0) {
-            d.resolve(capturedOut.trim());
-        } else {
-            var errMsg = cmd + ': Command failed with exit code ' + code;
-            if (capturedErr) {
-                errMsg += ' Error output:\n' + capturedErr.trim();
-            }
-            var err = new Error(errMsg);
-            err.code = code;
-            d.reject(err);
-        }
-    }
-
-    return d.promise;
-};
-
-exports.maybeSpawn = function(cmd, args, opts) {
-    if (fs.existsSync(cmd)) {
-        return exports.spawn(cmd, args, opts);
-    }
-    return Q(null);
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/util/addProperty.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/util/addProperty.js b/node_modules/cordova-common/src/util/addProperty.js
deleted file mode 100644
index 7dc4dc1..0000000
--- a/node_modules/cordova-common/src/util/addProperty.js
+++ /dev/null
@@ -1,32 +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.
-*/
-
-module.exports = function addProperty(module, property, modulePath, obj) {
-    
-    obj = obj || module.exports;
-    // Add properties as getter to delay load the modules on first invocation
-    Object.defineProperty(obj, property, {
-        configurable: true,
-        get: function () {
-            var delayLoadedModule = module.require(modulePath);
-            obj[property] = delayLoadedModule;
-            return delayLoadedModule;
-        }
-    });
-};

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/util/plist-helpers.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/util/plist-helpers.js b/node_modules/cordova-common/src/util/plist-helpers.js
deleted file mode 100644
index 9dee5c6..0000000
--- a/node_modules/cordova-common/src/util/plist-helpers.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *
- * Copyright 2013 Brett Rudd
- *
- * 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.
- *
-*/
-
-// contains PLIST utility functions
-var __     = require('underscore');
-var plist = require('plist');
-
-// adds node to doc at selector
-module.exports.graftPLIST = graftPLIST;
-function graftPLIST(doc, xml, selector) {
-    var obj = plist.parse('<plist>'+xml+'</plist>');
-
-    var node = doc[selector];
-    if (node && Array.isArray(node) && Array.isArray(obj)){
-        node = node.concat(obj);
-        for (var i =0;i<node.length; i++){
-            for (var j=i+1; j<node.length; ++j) {
-              if (nodeEqual(node[i], node[j]))
-                    node.splice(j--,1);
-            }
-        }
-        doc[selector] = node;
-    } else {
-        //plist uses objects for <dict>. If we have two dicts we merge them instead of
-        // overriding the old one. See CB-6472
-        if (node && __.isObject(node) && __.isObject(obj) && !__.isDate(node) && !__.isDate(obj)){//arrays checked above
-            __.extend(obj,node);
-        }
-        doc[selector] = obj;
-    }
-
-    return true;
-}
-
-// removes node from doc at selector
-module.exports.prunePLIST = prunePLIST;
-function prunePLIST(doc, xml, selector) {
-    var obj = plist.parse('<plist>'+xml+'</plist>');
-
-    pruneOBJECT(doc, selector, obj);
-
-    return true;
-}
-
-function pruneOBJECT(doc, selector, fragment) {
-    if (Array.isArray(fragment) && Array.isArray(doc[selector])) {
-        var empty = true;
-        for (var i in fragment) {
-            for (var j in doc[selector]) {
-                empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty;
-            }
-        }
-        if (empty)
-        {
-            delete doc[selector];
-            return true;
-        }
-    }
-    else if (nodeEqual(doc[selector], fragment)) {
-        delete doc[selector];
-        return true;
-    }
-
-    return false;
-}
-
-function nodeEqual(node1, node2) {
-    if (typeof node1 != typeof node2)
-        return false;
-    else if (typeof node1 == 'string') {
-        node2 = escapeRE(node2).replace(new RegExp('\\$[a-zA-Z0-9-_]+','gm'),'(.*?)');
-        return new RegExp('^' + node2 + '$').test(node1);
-    }
-    else {
-        for (var key in node2) {
-            if (!nodeEqual(node1[key], node2[key])) return false;
-        }
-        return true;
-    }
-}
-
-// escape string for use in regex
-function escapeRE(str) {
-    return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '$&');
-}

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-common/src/util/xml-helpers.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/util/xml-helpers.js b/node_modules/cordova-common/src/util/xml-helpers.js
deleted file mode 100644
index 6366af9..0000000
--- a/node_modules/cordova-common/src/util/xml-helpers.js
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * 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.
- *
-*/
-
-/* jshint sub:true, laxcomma:true */
-
-/**
- * contains XML utility functions, some of which are specific to elementtree
- */
-
-var fs = require('fs')
-  , path = require('path')
-  , _ = require('underscore')
-  , et = require('elementtree')
-  ;
-
-module.exports = {
-    // compare two et.XML nodes, see if they match
-    // compares tagName, text, attributes and children (recursively)
-    equalNodes: function(one, two) {
-        if (one.tag != two.tag) {
-            return false;
-        } else if (one.text.trim() != two.text.trim()) {
-            return false;
-        } else if (one._children.length != two._children.length) {
-            return false;
-        }
-
-        var oneAttribKeys = Object.keys(one.attrib),
-            twoAttribKeys = Object.keys(two.attrib),
-            i = 0, attribName;
-
-        if (oneAttribKeys.length != twoAttribKeys.length) {
-            return false;
-        }
-
-        for (i; i < oneAttribKeys.length; i++) {
-            attribName = oneAttribKeys[i];
-
-            if (one.attrib[attribName] != two.attrib[attribName]) {
-                return false;
-            }
-        }
-
-        for (i; i < one._children.length; i++) {
-            if (!module.exports.equalNodes(one._children[i], two._children[i])) {
-                return false;
-            }
-        }
-
-        return true;
-    },
-
-    // adds node to doc at selector, creating parent if it doesn't exist
-    graftXML: function(doc, nodes, selector, after) {
-        var parent = resolveParent(doc, selector);
-        if (!parent) {
-            //Try to create the parent recursively if necessary
-            try {
-                var parentToCreate = et.XML('<' + path.basename(selector) + '>'),
-                    parentSelector = path.dirname(selector);
-
-                this.graftXML(doc, [parentToCreate], parentSelector);
-            } catch (e) {
-                return false;
-            }
-            parent = resolveParent(doc, selector);
-            if (!parent) return false;
-        }
-
-        nodes.forEach(function (node) {
-            // check if child is unique first
-            if (uniqueChild(node, parent)) {
-                var children = parent.getchildren();
-                var insertIdx = after ? findInsertIdx(children, after) : children.length;
-
-                //TODO: replace with parent.insert after the bug in ElementTree is fixed
-                parent.getchildren().splice(insertIdx, 0, node);
-            }
-        });
-
-        return true;
-    },
-
-    // removes node from doc at selector
-    pruneXML: function(doc, nodes, selector) {
-        var parent = resolveParent(doc, selector);
-        if (!parent) return false;
-
-        nodes.forEach(function (node) {
-            var matchingKid = null;
-            if ((matchingKid = findChild(node, parent)) !== null) {
-                // stupid elementtree takes an index argument it doesn't use
-                // and does not conform to the python lib
-                parent.remove(matchingKid);
-            }
-        });
-
-        return true;
-    },
-
-    parseElementtreeSync: function (filename) {
-        var contents = fs.readFileSync(filename, 'utf-8');
-        if(contents) {
-            //Windows is the BOM. Skip the Byte Order Mark.
-            contents = contents.substring(contents.indexOf('<'));
-        }
-        return new et.ElementTree(et.XML(contents));
-    }
-};
-
-function findChild(node, parent) {
-    var matchingKids = parent.findall(node.tag)
-      , i, j;
-
-    for (i = 0, j = matchingKids.length ; i < j ; i++) {
-        if (module.exports.equalNodes(node, matchingKids[i])) {
-            return matchingKids[i];
-        }
-    }
-    return null;
-}
-
-function uniqueChild(node, parent) {
-    var matchingKids = parent.findall(node.tag)
-      , i = 0;
-
-    if (matchingKids.length === 0) {
-        return true;
-    } else  {
-        for (i; i < matchingKids.length; i++) {
-            if (module.exports.equalNodes(node, matchingKids[i])) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
-
-var ROOT = /^\/([^\/]*)/,
-    ABSOLUTE = /^\/([^\/]*)\/(.*)/;
-
-function resolveParent(doc, selector) {
-    var parent, tagName, subSelector;
-
-    // handle absolute selector (which elementtree doesn't like)
-    if (ROOT.test(selector)) {
-        tagName = selector.match(ROOT)[1];
-        // test for wildcard "any-tag" root selector
-        if (tagName == '*' || tagName === doc._root.tag) {
-            parent = doc._root;
-
-            // could be an absolute path, but not selecting the root
-            if (ABSOLUTE.test(selector)) {
-                subSelector = selector.match(ABSOLUTE)[2];
-                parent = parent.find(subSelector);
-            }
-        } else {
-            return false;
-        }
-    } else {
-        parent = doc.find(selector);
-    }
-    return parent;
-}
-
-// Find the index at which to insert an entry. After is a ;-separated priority list
-// of tags after which the insertion should be made. E.g. If we need to
-// insert an element C, and the rule is that the order of children has to be
-// As, Bs, Cs. After will be equal to "C;B;A".
-function findInsertIdx(children, after) {
-    var childrenTags = children.map(function(child) { return child.tag; });
-    var afters = after.split(';');
-    var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); });
-    var foundIndex = _.find(afterIndexes, function(index) { return index != -1; });
-
-    //add to the beginning if no matching nodes are found
-    return typeof foundIndex === 'undefined' ? 0 : foundIndex+1;
-}
-
-var BLACKLIST = ['platform', 'feature','plugin','engine'];
-var SINGLETONS = ['content', 'author', 'name'];
-function mergeXml(src, dest, platform, clobber) {
-    // Do nothing for blacklisted tags.
-    if (BLACKLIST.indexOf(src.tag) != -1) return;
-
-    //Handle attributes
-    Object.getOwnPropertyNames(src.attrib).forEach(function (attribute) {
-        if (clobber || !dest.attrib[attribute]) {
-            dest.attrib[attribute] = src.attrib[attribute];
-        }
-    });
-    //Handle text
-    if (src.text && (clobber || !dest.text)) {
-        dest.text = src.text;
-    }
-    //Handle children
-    src.getchildren().forEach(mergeChild);
-
-    //Handle platform
-    if (platform) {
-        src.findall('platform[@name="' + platform + '"]').forEach(function (platformElement) {
-            platformElement.getchildren().forEach(mergeChild);
-        });
-    }
-
-    //Handle duplicate preference tags (by name attribute)
-    removeDuplicatePreferences(dest);
-
-    function mergeChild (srcChild) {
-        var srcTag = srcChild.tag,
-            destChild = new et.Element(srcTag),
-            foundChild,
-            query = srcTag + '',
-            shouldMerge = true;
-
-        if (BLACKLIST.indexOf(srcTag) === -1) {
-            if (SINGLETONS.indexOf(srcTag) !== -1) {
-                foundChild = dest.find(query);
-                if (foundChild) {
-                    destChild = foundChild;
-                    dest.remove(destChild);
-                }
-            } else {
-                //Check for an exact match and if you find one don't add
-                Object.getOwnPropertyNames(srcChild.attrib).forEach(function (attribute) {
-                    query += '[@' + attribute + '="' + srcChild.attrib[attribute] + '"]';
-                });
-                var foundChildren = dest.findall(query);
-                for(var i = 0; i < foundChildren.length; i++) {
-                    foundChild = foundChildren[i];
-                    if (foundChild && textMatch(srcChild, foundChild) && (Object.keys(srcChild.attrib).length==Object.keys(foundChild.attrib).length)) {
-                        destChild = foundChild;
-                        dest.remove(destChild);
-                        shouldMerge = false;
-                        break;
-                    }
-                }
-            }
-
-            mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
-            dest.append(destChild);
-        }
-    }
-    
-    function removeDuplicatePreferences(xml) {
-        // reduce preference tags to a hashtable to remove dupes
-        var prefHash = xml.findall('preference[@name][@value]').reduce(function(previousValue, currentValue) {
-            previousValue[ currentValue.attrib.name ] = currentValue.attrib.value;
-            return previousValue;
-        }, {});
-        
-        // remove all preferences
-        xml.findall('preference[@name][@value]').forEach(function(pref) {
-            xml.remove(pref);
-        });
-        
-        // write new preferences
-        Object.keys(prefHash).forEach(function(key, index) {
-            var element = et.SubElement(xml, 'preference');
-            element.set('name', key);
-            element.set('value', this[key]);
-        }, prefHash);
-    }
-}
-
-// Expose for testing.
-module.exports.mergeXml = mergeXml;
-
-function textMatch(elm1, elm2) {
-    var text1 = elm1.text ? elm1.text.replace(/\s+/, '') : '',
-        text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
-    return (text1 === '' || text1 === text2);
-}

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-fetch/.jshintrc
----------------------------------------------------------------------
diff --git a/node_modules/cordova-fetch/.jshintrc b/node_modules/cordova-fetch/.jshintrc
deleted file mode 100644
index 62edb5c..0000000
--- a/node_modules/cordova-fetch/.jshintrc
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "node": true,
-  "bitwise": true,
-  "undef": true,
-  "trailing": true,
-  "quotmark": true,
-  "indent": 4,
-  "unused": "vars",
-  "latedef": "nofunc",
-  "-W030": false,
-  "jasmine": true
-}

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-fetch/.ratignore
----------------------------------------------------------------------
diff --git a/node_modules/cordova-fetch/.ratignore b/node_modules/cordova-fetch/.ratignore
deleted file mode 100644
index 797ab11..0000000
--- a/node_modules/cordova-fetch/.ratignore
+++ /dev/null
@@ -1,2 +0,0 @@
-jasmine.json
-testpkg.json

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-fetch/README.md
----------------------------------------------------------------------
diff --git a/node_modules/cordova-fetch/README.md b/node_modules/cordova-fetch/README.md
deleted file mode 100644
index b6a2d33..0000000
--- a/node_modules/cordova-fetch/README.md
+++ /dev/null
@@ -1,50 +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.
-#
--->
-
-# cordova-fetch
-
-This module is used for fetching modules from npm and gitURLs. It fetches the modules via `npm install`. It can also `npm uninstall` modules from a project.
-
-## Usage:
-
-### Fetching:
-```
-var fetch = require('cordova-fetch');
-
-fetch(spec, dest, opts);
-```
-
-`spec` can be a string containg a npm `packageID` or a `git URL`. 
-`dest` is string of the directory location you wish to `npm install` these modules.
-`opts` is an Object of options cordova fetch handles. Currently, fetch only support the `save` option.
-    eg. `{'save':true}`
-
-### Removing:
-```
-var npmUninstall = require('cordova-fetch').uninstall;
-
-npmUninstall(spec, dest, opts);
-```
-
-`spec` can be a string containg a npm `packageID`. 
-`dest` is string of the directory location you wish to `npm uninstall` these modules.
-`opts` is an Object of options cordova fetch handles. Currently, fetch only support the `save` option.
-    eg. `{'save':true}`

http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cordova-fetch/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/node_modules/cordova-fetch/RELEASENOTES.md b/node_modules/cordova-fetch/RELEASENOTES.md
deleted file mode 100644
index e86e277..0000000
--- a/node_modules/cordova-fetch/RELEASENOTES.md
+++ /dev/null
@@ -1,26 +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.
-#
--->
-# Cordova-fetch Release Notes
-
-### 1.0.0 (May 12, 2016)
-* [CB-9858](https://issues.apache.org/jira/browse/CB-9858) Added jasmine tests
-* [CB-9858](https://issues.apache.org/jira/browse/CB-9858) Added `npm uninstall` method to cordova-fetch
-* [CB-9858](https://issues.apache.org/jira/browse/CB-9858) Initial implementation of `cordova-fetch` module


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message