Repository: cordova-android Updated Branches: refs/heads/master 1887c12d1 -> 9af7f506f (forced update)
CB-11095 Fix plugin add/removal when running on Node v.010 Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/9af7f506 Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/9af7f506 Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/9af7f506 Branch: refs/heads/master Commit: 9af7f506f03b468734406341ae98599dbd2af676 Parents: 9b8558d Author: Vladimir Kotikov <[email protected]> Authored: Mon Apr 18 11:55:31 2016 +0300 Committer: Vladimir Kotikov <[email protected]> Committed: Mon Apr 18 12:26:39 2016 +0300 ---------------------------------------------------------------------- bin/templates/cordova/lib/pluginHandlers.js | 2 +- spec/unit/pluginHandlers/handlers.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9af7f506/bin/templates/cordova/lib/pluginHandlers.js ---------------------------------------------------------------------- diff --git a/bin/templates/cordova/lib/pluginHandlers.js b/bin/templates/cordova/lib/pluginHandlers.js index d14bcf6..f77adf1 100644 --- a/bin/templates/cordova/lib/pluginHandlers.js +++ b/bin/templates/cordova/lib/pluginHandlers.js @@ -152,7 +152,7 @@ var handlers = { 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))); // Read in the file, prepend the cordova.define, and write it back out. var scriptContent = fs.readFileSync(moduleSource, 'utf-8').replace(/^\ufeff/, ''); // Window BOM http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9af7f506/spec/unit/pluginHandlers/handlers.spec.js ---------------------------------------------------------------------- diff --git a/spec/unit/pluginHandlers/handlers.spec.js b/spec/unit/pluginHandlers/handlers.spec.js index 93ac4a1..08a6275 100644 --- a/spec/unit/pluginHandlers/handlers.spec.js +++ b/spec/unit/pluginHandlers/handlers.spec.js @@ -164,7 +164,7 @@ describe('android project handler', function() { }); describe('of <js-module> elements', function() { - var jsModule = {src: 'www/dummyPlugin.js'}; + var jsModule = {src: 'www/dummyplugin.js'}; var wwwDest, platformWwwDest; beforeEach(function () { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
