CB-11095 Fix plugin add/removal when running on Node v.010

This commit is contained in:
Vladimir Kotikov 2016-04-18 11:55:31 +03:00
parent 9b8558dbde
commit 9af7f506f0
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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 () {