cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kam...@apache.org
Subject git commit: Remove unused code from plugman/install.js
Date Fri, 16 May 2014 18:45:00 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master f9e3ed1e5 -> 9daafe8c8


Remove unused code from plugman/install.js

isPluginInstalled() function was defined twice with exactly the same body.

"usused:vars" directive for jshint means it will warn about unused variables
but not about unused function parameters.


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

Branch: refs/heads/master
Commit: 9daafe8c8d5f6fde046be6916019e58b8ed60765
Parents: f9e3ed1
Author: Mark Koudritsky <kamrik@gmail.com>
Authored: Fri May 16 14:41:05 2014 -0400
Committer: Mark Koudritsky <kamrik@gmail.com>
Committed: Fri May 16 14:44:03 2014 -0400

----------------------------------------------------------------------
 cordova-lib/src/plugman/install.js | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9daafe8c/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index 7d2d664..7020a5f 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -1,4 +1,4 @@
-/* jshint node:true, asi:true, laxcomma:true, sub:true, expr:true */
+/* jshint node:true, asi:true, laxcomma:true, sub:true, expr:true, unused:vars */
 
 var path = require('path'),
     fs   = require('fs'),
@@ -137,7 +137,6 @@ function cleanVersionOutput(version, name){
 // exec engine scripts in order to get the current engine version
 // Returns a promise for the array of engines.
 function callEngineScripts(engines) {
-    var engineScriptVersion;
 
     return Q.all(
         engines.map(function(engine){
@@ -241,7 +240,6 @@ var runInstall = module.exports.runInstall = function runInstall(actions,
platfo
     var xml_path     = path.join(plugin_dir, 'plugin.xml')
       , plugin_et    = xml_helpers.parseElementtreeSync(xml_path)
       , filtered_variables = {};
-    var name         = plugin_et.findall('name').text;
     var plugin_id    = plugin_et.getroot().attrib['id'];
 
     options = options || {};
@@ -622,19 +620,3 @@ function copyPlugin(plugin_src_dir, plugins_dir, link) {
 
     return dest;
 }
-
-function isPluginInstalled(plugins_dir, platform, plugin_id) {
-    var installed_plugin_id;
-    var platform_config = config_changes.get_platform_json(plugins_dir, platform);
-    for (installed_plugin_id in platform_config.installed_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    for (installed_plugin_id in platform_config.dependent_plugins) {
-        if (installed_plugin_id == plugin_id) {
-            return true;
-        }
-    }
-    return false;
-}


Mime
View raw message