Skip to content

Commit

Permalink
Merge pull request AlexDisler#56 from brocelia/cordova-splash
Browse files Browse the repository at this point in the history
  • Loading branch information
ath0mas committed Dec 6, 2020
2 parents 0c08649 + 814615f commit 21e5d97
Showing 1 changed file with 5 additions and 1 deletion.
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.SPLASH_FILE = argv.splash || 'splash.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 splash screen names and sizes
Expand Down Expand Up @@ -59,7 +60,7 @@ var getPlatforms = function (projectName) {
platforms.push({
name : 'android',
isAdded : fs.existsSync('platforms/android'),
splashPath : 'platforms/android/res/',
splashPath : settings.OLD_ANDROID_PATH ? 'platforms/android/res/' : 'platforms/android/app/src/main/res/',
splash : [
// Landscape
{ name: 'drawable-land-ldpi/screen.png', width: 320, height: 200 },
Expand Down Expand Up @@ -135,6 +136,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

0 comments on commit 21e5d97

Please sign in to comment.