Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE5FF19E6D for ; Mon, 18 Apr 2016 09:20:21 +0000 (UTC) Received: (qmail 89208 invoked by uid 500); 18 Apr 2016 09:20:21 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 89165 invoked by uid 500); 18 Apr 2016 09:20:21 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 89154 invoked by uid 99); 18 Apr 2016 09:20:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 09:20:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3D5D7DFB95; Mon, 18 Apr 2016 09:20:21 +0000 (UTC) From: vladimir-kotikov To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-windows pull request: CB-11022 Duplicate www files on plug... Content-Type: text/plain Message-Id: <20160418092021.3D5D7DFB95@git1-us-west.apache.org> Date: Mon, 18 Apr 2016 09:20:21 +0000 (UTC) Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/167#discussion_r60028006 --- Diff: template/cordova/lib/PluginHandler.js --- @@ -123,24 +123,27 @@ var handlers = { throw new CordovaError(' tag without required "target" attribute'); } - var www = options.usePlatformWww ? project.platformWww : project.www; - copyFile(plugin.dir, obj.src, www, obj.target); + copyFile(plugin.dir, obj.src, project.www, obj.target); + if (options && options.usePlatformWww) copyFile(plugin.dir, obj.src, project.platformWww, obj.target); }, uninstall:function(obj, plugin, project, options) { var target = obj.target || obj.src; if (!target) throw new CordovaError(' tag without required "target" attribute'); - var www = options.usePlatformWww ? project.platformWww : project.www; - removeFile(www, target); - shell.rm('-Rf', path.resolve(www, 'plugins', plugin.id)); + removeFile(project.www, target); + removeFile(project.www, path.join('plugins', plugin.id)); + if (options && options.usePlatformWww) { + removeFile(project.platformWww, target); + removeFile(project.platformWww, path.join('plugins', plugin.id)); + } } }, 'js-module': { install: function (obj, plugin, project, options) { // Copy the plugin's files into the www directory. var moduleSource = path.resolve(plugin.dir, obj.src); - var moduleName = plugin.id + '.' + (obj.name || path.parse(obj.src).name); + var moduleName = plugin.id + '.' + (obj.name || path.basename(obj.src, path.extname (obj.src))); --- End diff -- Yup, these are the same, but `path.parse` is not available in Node v0.10 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org