<commit_before>var fs     = require('fs');
var xml2js = require('xml2js');
var ig     = require('imagemagick');
var colors = require('colors');
var _      = require('underscore');
var Q      = require('q');

/**
 * Check which platforms are added to the project and return their splash screen names and sizes
 *
 * @param  {String} projectName
 * @return {Promise} resolves with an array of platforms
 */
var getPlatforms = function (projectName) {
    var deferred = Q.defer();
    var platforms = [];
    platforms.push({
        name : 'ios',
        // TODO: use async fs.exists
        isAdded : fs.existsSync('platforms/ios'),
        splashPath : 'platforms/ios/' + projectName + '/Images.xcassets/LaunchImage.launchimage/',
        splash : [
            { name : 'Default-568h@2x~iphone.png',    width : 640,  height : 1136 },
            { name : 'Default-667h.png',              width : 750,  height : 1334 },
            { name : 'Default-736h.png',              width : 1242, height : 2208 },
            { name : 'Default-Landscape-736h.png',    width : 2208, height : 1242 },
            { name : 'Default-Landscape@2x~ipad.png', width : 2048, height : 1536 },
            { name : 'Default-Landscape~ipad.png',    width : 1024, height : 768  },
            { name : 'Default-Portrait@2x~ipad.png',  width : 1536, height : 2048 },
            { name : 'Default-Portrait~ipad.png',     width : 768,  height : 1024 },
            { name : 'Default@2x~iphone.png',         width : 640,  height : 960  },
            { name : 'Default~iphone.png',            width : 320,  height : 480  }
        ]
    });
    platforms.push({
        name : 'android',
        isAdded : fs.existsSync('platforms/android'),
        splashPath : 'platforms/android/res/',
        splash : [
            { name : 'drawable-land-ldpi/screen.png',  width : 320,  height: 200  },
            { name : 'drawable-land-mdpi/screen.png',  width : 480,  height: 320  },
            { name : 'drawable-land-hdpi/screen.png',  width : 800,  height: 480  },
            { name : 'drawable-land-xhdpi/screen.png', width : 1280, height: 720  },
            { name : 'drawable-port-ldpi/screen.png',  width : 200,  height: 320  },
            { name : 'drawable-port-mdpi/screen.png',  width : 320,  height: 480  },
            { name : 'drawable-port-hdpi/screen.png',  width : 480,  height: 800  },
            { name : 'drawable-port-xhdpi/screen.png', width : 720,  height: 1280 }
        ]
    });
    platforms.push({
        name : 'windows',
        isAdded : fs.existsSync('platforms/windows'),
        splashPath : 'platforms/windows/images/',
        splash : [
            { name : 'SplashScreen.scale-100.png',      width : 620,  height: 300  },
            { name : 'SplashScreenPhone.scale-240.png', width : 1152, height: 1920 }
        ]
    });
    // TODO: add missing platforms
    deferred.resolve(platforms);<commit_msg>Add missing iOS Splash Screens<commit_after>var fs     = require('fs');
var xml2js = require('xml2js');
var ig     = require('imagemagick');
var colors = require('colors');
var _      = require('underscore');
var Q      = require('q');

/**
 * Check which platforms are added to the project and return their splash screen names and sizes
 *
 * @param  {String} projectName
 * @return {Promise} resolves with an array of platforms
 */
var getPlatforms = function (projectName) {
    var deferred = Q.defer();
    var platforms = [];
    platforms.push({
        name : 'ios',
        // TODO: use async fs.exists
        isAdded : fs.existsSync('platforms/ios'),
        splashPath : 'platforms/ios/' + projectName + '/Images.xcassets/LaunchImage.launchimage/',
        splash : [
            { name: 'Default-Portrait~iphone.png',          width: 320,  height: 480  },
            { name: 'Default-Portrait@2x~iphone.png',       width: 640,  height: 960  },
            { name: 'Default-Portrait-568h@2x~iphone.png',  width: 640,  height: 1136 },
            { name: 'Default-Portrait-667h@2x~iphone.png',  width: 750,  height: 1334 },
            { name: 'Default-Portrait-736h@3x~iphone.png',  width: 1242, height: 2208 },

            { name: 'Default-Landscape~iphone.png',         width: 480,  height: 320  },
            { name: 'Default-Landscape@2x~iphone.png',      width: 960,  height: 640  },
            { name: 'Default-Landscape-568h@2x~iphone.png', width: 1136, height: 640  },
            { name: 'Default-Landscape-667h@2x~iphone.png', width: 1334, height: 750  },
            { name: 'Default-Landscape-736h@3x~iphone.png', width: 2208, height: 1242 },

            { name: 'Default-Portrait~ipad.png',            width: 768,  height: 1024 },
            { name: 'Default-Portrait@2x~ipad.png',         width: 1536, height: 2048 },
            { name: 'Default-Portrait@2x~ipad-pro.png',     width: 2048, height: 2732 },

            { name: 'Default-Landscape~ipad.png',           width: 1024, height: 768  },
            { name: 'Default-Landscape@2x~ipad.png',        width: 2048, height: 1536 },
            { name: 'Default-Landscape@2x~ipad-pro.png',    width: 2732, height: 2048 }
        ]
    });
    platforms.push({
        name : 'android',
        isAdded : fs.existsSync('platforms/android'),
        splashPath : 'platforms/android/res/',
        splash : [
            { name: 'drawable-land-ldpi/screen.png',  width: 320,  height: 200  },
            { name: 'drawable-land-mdpi/screen.png',  width: 480,  height: 320  },
            { name: 'drawable-land-hdpi/screen.png',  width: 800,  height: 480  },
            { name: 'drawable-land-xhdpi/screen.png', width: 1280, height: 720  },
            { name: 'drawable-port-ldpi/screen.png',  width: 200,  height: 320  },
            { name: 'drawable-port-mdpi/screen.png',  width: 320,  height: 480  },
            { name: 'drawable-port-hdpi/screen.png',  width: 480,  height: 800  },
            { name: 'drawable-port-xhdpi/screen.png', width: 720,  height: 1280 }
        ]
    });
    platforms.push({
        name : 'windows',
        isAdded : fs.existsSync('platforms/windows'),
        splashPath : 'platforms/windows/images/',
        splash : [
            { name: 'SplashScreen.scale-100.png',      width: 620,  height: 300  },
            { name: 'SplashScreenPhone.scale-240.png', width: 1152, height: 1920 }
        ]
    });
    // TODO: add missing platforms
    deferred.resolve(platforms);
{'fraction_non_alphanumeric': 0.15091986280012473, 'fraction_numerical': 0.058621764889304644, 'mean_word_length': 2.1600985221674875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2687359', 'n_tokens_mistral': 2355, 'n_tokens_neox': 2025, 'n_words': 455}