You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ka...@apache.org on 2014/06/23 20:48:47 UTC
git commit: Fix JSHint errors from the splash screenscommit
Repository: cordova-lib
Updated Branches:
refs/heads/master 098565911 -> 2823831d2
Fix JSHint errors from the splash screenscommit
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/2823831d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/2823831d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/2823831d
Branch: refs/heads/master
Commit: 2823831d2904bfc43b6e8ecf19a15e4074afaf65
Parents: 0985659
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Mon Jun 23 14:47:44 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Mon Jun 23 14:47:44 2014 -0400
----------------------------------------------------------------------
.../src/cordova/metadata/android_parser.js | 16 ++++++++--------
cordova-lib/src/cordova/metadata/ios_parser.js | 18 +++++++++---------
.../src/cordova/metadata/windows_parser.js | 4 ++--
cordova-lib/src/cordova/metadata/wp8_parser.js | 4 ++--
4 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/2823831d/cordova-lib/src/cordova/metadata/android_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/android_parser.js b/cordova-lib/src/cordova/metadata/android_parser.js
index 85658d1..01d478c 100644
--- a/cordova-lib/src/cordova/metadata/android_parser.js
+++ b/cordova-lib/src/cordova/metadata/android_parser.js
@@ -187,10 +187,10 @@ module.exports.prototype = {
var destfilepath;
// copy the default icon to the drawable folder
if (default_icon) {
- srcfilepath = path.join(projectRoot, default_icon.src);
- destfilepath = path.join(this.path, 'res', 'drawable', 'icon.png');
- events.emit('verbose', 'Copying default icon from ' + srcfilepath + ' to ' + destfilepath);
- shell.cp('-f', srcfilepath, destfilepath);
+ srcfilepath = path.join(projectRoot, default_icon.src);
+ destfilepath = path.join(this.path, 'res', 'drawable', 'icon.png');
+ events.emit('verbose', 'Copying default icon from ' + srcfilepath + ' to ' + destfilepath);
+ shell.cp('-f', srcfilepath, destfilepath);
}
// copyIcon does the actual copying into the drawable folders
var copyIcon = function(density) {
@@ -200,10 +200,10 @@ module.exports.prototype = {
events.emit('verbose', 'Copying icon from ' + srcfilepath + ' to ' + destfilepath);
shell.cp('-f', srcfilepath, destfilepath);
}
- }.bind(this);
- for (var j=0; j<densities.length; j++) {
- copyIcon(densities[j]);
- }
+ }.bind(this);
+ for (var j=0; j<densities.length; j++) {
+ copyIcon(densities[j]);
+ }
},
update_from_config:function(config) {
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/2823831d/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js
index 2d3dfd4..67a07a8 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -106,7 +106,7 @@ module.exports.prototype = {
];
platformIcons.forEach(function (item) {
- icon = icons.getBySize(item.width, item.height) || icons.getDefault();
+ var icon = icons.getBySize(item.width, item.height) || icons.getDefault();
if (icon){
var src = path.join(appRoot, icon.src),
dest = path.join(platformRoot, 'Resources/icons/', item.dest);
@@ -118,17 +118,17 @@ module.exports.prototype = {
// Update splashscreens
var splashScreens = config.getSplashScreens('ios');
var platformSplashScreens = [
- {dest: "Resources/splash/Default~iphone.png", width: 320, height: 480},
- {dest: "Resources/splash/Default@2x~iphone.png", width: 640, height: 960},
- {dest: "Resources/splash/Default-Portrait~ipad.png", width: 768, height: 1024},
- {dest: "Resources/splash/Default-Portrait@2x~ipad.png", width: 1536, height: 2048},
- {dest: "Resources/splash/Default-Landscape~ipad.png", width: 1024, height: 768},
- {dest: "Resources/splash/Default-Landscape@2x~ipad.png", width: 2048, height: 1536},
- {dest: "Resources/splash/Default-568h@2x~iphone.png", width: 640, height: 1136}
+ {dest: 'Resources/splash/Default~iphone.png', width: 320, height: 480},
+ {dest: 'Resources/splash/Default@2x~iphone.png', width: 640, height: 960},
+ {dest: 'Resources/splash/Default-Portrait~ipad.png', width: 768, height: 1024},
+ {dest: 'Resources/splash/Default-Portrait@2x~ipad.png', width: 1536, height: 2048},
+ {dest: 'Resources/splash/Default-Landscape~ipad.png', width: 1024, height: 768},
+ {dest: 'Resources/splash/Default-Landscape@2x~ipad.png', width: 2048, height: 1536},
+ {dest: 'Resources/splash/Default-568h@2x~iphone.png', width: 640, height: 1136}
];
platformSplashScreens.forEach(function(item) {
- splash = splashScreens.getBySize(item.width, item.height);
+ var splash = splashScreens.getBySize(item.width, item.height);
if (splash){
var src = path.join(appRoot, splash.src),
dest = path.join(platformRoot, item.dest);
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/2823831d/cordova-lib/src/cordova/metadata/windows_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/windows_parser.js b/cordova-lib/src/cordova/metadata/windows_parser.js
index f0704bb..ce08abf 100644
--- a/cordova-lib/src/cordova/metadata/windows_parser.js
+++ b/cordova-lib/src/cordova/metadata/windows_parser.js
@@ -195,7 +195,7 @@ module.exports.prototype = {
];
platformIcons.forEach(function (item) {
- icon = icons.getBySize(item.width, item.height) || icons.getDefault();
+ var icon = icons.getBySize(item.width, item.height) || icons.getDefault();
if (icon){
var src = path.join(appRoot, icon.src),
dest = path.join(platformRoot, item.dest);
@@ -210,7 +210,7 @@ module.exports.prototype = {
var splash = config.getSplashScreens('windows8').getBySize(620, 300);
if (splash){
var src = path.join(appRoot, splash.src),
- dest = path.join(platformRoot, "images/splashscreen.png");
+ dest = path.join(platformRoot, 'images/splashscreen.png');
events.emit('verbose', 'Copying icon from ' + src + ' to ' + dest);
shell.cp('-f', src, dest);
}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/2823831d/cordova-lib/src/cordova/metadata/wp8_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/wp8_parser.js b/cordova-lib/src/cordova/metadata/wp8_parser.js
index 55dc21e..991bf0f 100644
--- a/cordova-lib/src/cordova/metadata/wp8_parser.js
+++ b/cordova-lib/src/cordova/metadata/wp8_parser.js
@@ -159,7 +159,7 @@ module.exports.prototype = {
];
platformIcons.forEach(function (item) {
- icon = icons.getBySize(item.width, item.height) || icons.getDefault();
+ var icon = icons.getBySize(item.width, item.height) || icons.getDefault();
if (icon){
var src = path.join(appRoot, icon.src),
dest = path.join(platformRoot, item.dest);
@@ -174,7 +174,7 @@ module.exports.prototype = {
var splash = config.getSplashScreens('wp8').getBySize(768, 1280);
if (splash){
var src = path.join(appRoot, splash.src),
- dest = path.join(platformRoot, "SplashScreenImage.jpg");
+ dest = path.join(platformRoot, 'SplashScreenImage.jpg');
events.emit('verbose', 'Copying icon from ' + src + ' to ' + dest);
shell.cp('-f', src, dest);
}