Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Fix the productName value when attributes are used #121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var settings = {};
settings.CONFIG_FILE = argv.config || 'config.xml';
settings.ICON_FILE = argv.icon || 'icon.png';
settings.OLD_XCODE_PATH = argv['xcode-old'] || false;
settings.OLD_ANDROID_PATH = argv['android-old'] || false;

/**
* Check which platforms are added to the project and return their icon names and sizes
Expand Down Expand Up @@ -69,7 +70,7 @@ var getPlatforms = function (projectName) {
platforms.push({
name : 'android',
isAdded : fs.existsSync('platforms/android'),
iconsPath : 'platforms/android/app/src/main/res/',
iconsPath : settings.OLD_ANDROID_PATH ? 'platforms/android/res/' : 'platforms/android/app/src/main/res/',
icons : [
{ name : 'drawable/icon.png', size : 96 },
{ name : 'drawable-hdpi/icon.png', size : 72 },
Expand Down Expand Up @@ -197,6 +198,9 @@ var getProjectName = function () {
deferred.reject(err);
}
var projectName = result.widget.name[0];
if (typeof projectName == "object") {
projectName = projectName._.trim()
}
deferred.resolve(projectName);
});
});
Expand Down