function getPlatforms (projectRoot) {
    var xml = cordova_util.projectConfig(projectRoot);
    var cfg = new ConfigParser(xml);

    // If an engine's 'version' property is really its source, map that to the appropriate field.
    var engines = cfg.getEngines().map(function (engine) {
        var result = {
            name: engine.name
        };

        if (semver.validRange(engine.spec, true)) {
            result.version = engine.spec;
        } else {
            result.src = engine.spec;
        }

        return result;
    });

    return Promise.resolve(engines);
}
function getPlatforms (projectRoot) {
    var xml = cordova_util.projectConfig(projectRoot);
    var cfg = new ConfigParser(xml);

    // If an engine's 'version' property is really its source, map that to the appropriate field.
    var engines = cfg.getEngines().map(function (engine) {
        var result = {
            name: engine.name
        };

        if (semver.validRange(engine.spec, true)) {
            result.version = engine.spec;
        } else {
            result.src = engine.spec;
        }

        return result;
    });

    return Promise.resolve(engines);
}
function getPlatforms ( projectRoot ) { var xml = cordova_util . projectConfig ( projectRoot ) ; var cfg = new ConfigParser ( xml ) ; // If an engine's 'version' property is really its source, map that to the appropriate field. var engines = cfg . getEngines ( ) . map ( function ( engine ) { var result = { name : engine . name } ; if ( semver . validRange ( engine . spec , true ) ) { result . version = engine . spec ; } else { result . src = engine . spec ; } return result ; } ) ; return Promise . resolve ( engines ) ; }
Returns all the platforms that are currently saved into config.xml
@return {Promise<{name: string, version: string, src: string}[]>}
e.g: [ {name: 'android', version: '3.5.0'}, {name: 'wp8', src: 'C:/path/to/platform'}, {name: 'ios', src: 'git://...'} ]
Returns all the platforms that are currently saved into config . xml