taco-team-build.js
function prepareProject(cordovaPlatforms, args, /* optional */ projectPath) {
    if (typeof (cordovaPlatforms) == "string") {
        cordovaPlatforms = [cordovaPlatforms];
    }

    if (!projectPath) {
        projectPath = defaultConfig.projectPath;
    }

    var appendedVersion = cache.getModuleVersionFromConfig(defaultConfig);
    if (appendedVersion) {
        appendedVersion = '@' + appendedVersion;
    } else {
        appendedVersion = '';
    }

    return utilities.isCompatibleNpmPackage(defaultConfig.nodePackageName + appendedVersion).then(function (compatibilityResult) {
        switch (compatibilityResult) {
            case utilities.NodeCompatibilityResult.IncompatibleVersion4Ios:
                throw new Error('This Cordova version does not support Node.js 4.0.0 for iOS builds. Either downgrade to an earlier version of Node.js or move to Cordova 5.3.3 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
            case utilities.NodeCompatibilityResult.IncompatibleVersion5:
                throw new Error('This Cordova version does not support Node.js 5.0.0 or later. Either downgrade to an earlier version of Node.js or move to Cordova 5.4.0 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
        }

        return setupCordova();
    }).then(function (cordova) {
        return addSupportPluginIfRequested(cordova, defaultConfig);
    }).then(function (cordova) {
        // Add platforms if not done already
        var promise = _addPlatformsToProject(cordovaPlatforms, projectPath, cordova);
        //Build each platform with args in args object
        cordovaPlatforms.forEach(function (platform) {
            promise = promise.then(function () {
                // Build app with platform specific args if specified
                var callArgs = utilities.getCallArgs(platform, args);
                var argsString = _getArgsString(callArgs.options);
                console.log('Queueing prepare for platform ' + platform + ' w/options: ' + argsString);
                return cordova.raw.prepare(callArgs);
            });
        });

        return promise;
    });
}
function prepareProject(cordovaPlatforms, args, /* optional */ projectPath) {
    if (typeof (cordovaPlatforms) == "string") {
        cordovaPlatforms = [cordovaPlatforms];
    }

    if (!projectPath) {
        projectPath = defaultConfig.projectPath;
    }

    var appendedVersion = cache.getModuleVersionFromConfig(defaultConfig);
    if (appendedVersion) {
        appendedVersion = '@' + appendedVersion;
    } else {
        appendedVersion = '';
    }

    return utilities.isCompatibleNpmPackage(defaultConfig.nodePackageName + appendedVersion).then(function (compatibilityResult) {
        switch (compatibilityResult) {
            case utilities.NodeCompatibilityResult.IncompatibleVersion4Ios:
                throw new Error('This Cordova version does not support Node.js 4.0.0 for iOS builds. Either downgrade to an earlier version of Node.js or move to Cordova 5.3.3 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
            case utilities.NodeCompatibilityResult.IncompatibleVersion5:
                throw new Error('This Cordova version does not support Node.js 5.0.0 or later. Either downgrade to an earlier version of Node.js or move to Cordova 5.4.0 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
        }

        return setupCordova();
    }).then(function (cordova) {
        return addSupportPluginIfRequested(cordova, defaultConfig);
    }).then(function (cordova) {
        // Add platforms if not done already
        var promise = _addPlatformsToProject(cordovaPlatforms, projectPath, cordova);
        //Build each platform with args in args object
        cordovaPlatforms.forEach(function (platform) {
            promise = promise.then(function () {
                // Build app with platform specific args if specified
                var callArgs = utilities.getCallArgs(platform, args);
                var argsString = _getArgsString(callArgs.options);
                console.log('Queueing prepare for platform ' + platform + ' w/options: ' + argsString);
                return cordova.raw.prepare(callArgs);
            });
        });

        return promise;
    });
}
function prepareProject ( cordovaPlatforms , args , /* optional */ projectPath ) { if ( typeof ( cordovaPlatforms ) == "string" ) { cordovaPlatforms = [ cordovaPlatforms ] ; } if ( ! projectPath ) { projectPath = defaultConfig . projectPath ; } var appendedVersion = cache . getModuleVersionFromConfig ( defaultConfig ) ; if ( appendedVersion ) { appendedVersion = '@' + appendedVersion ; } else { appendedVersion = '' ; } return utilities . isCompatibleNpmPackage ( defaultConfig . nodePackageName + appendedVersion ) . then ( function ( compatibilityResult ) { switch ( compatibilityResult ) { case utilities . NodeCompatibilityResult . IncompatibleVersion4Ios : throw new Error ( 'This Cordova version does not support Node.js 4.0.0 for iOS builds. Either downgrade to an earlier version of Node.js or move to Cordova 5.3.3 or later. See http://go.microsoft.com/fwlink/?LinkID=618471' ) ; case utilities . NodeCompatibilityResult . IncompatibleVersion5 : throw new Error ( 'This Cordova version does not support Node.js 5.0.0 or later. Either downgrade to an earlier version of Node.js or move to Cordova 5.4.0 or later. See http://go.microsoft.com/fwlink/?LinkID=618471' ) ; } return setupCordova ( ) ; } ) . then ( function ( cordova ) { return addSupportPluginIfRequested ( cordova , defaultConfig ) ; } ) . then ( function ( cordova ) { // Add platforms if not done already var promise = _addPlatformsToProject ( cordovaPlatforms , projectPath , cordova ) ; //Build each platform with args in args object cordovaPlatforms . forEach ( function ( platform ) { promise = promise . then ( function ( ) { // Build app with platform specific args if specified var callArgs = utilities . getCallArgs ( platform , args ) ; var argsString = _getArgsString ( callArgs . options ) ; console . log ( 'Queueing prepare for platform ' + platform + ' w/options: ' + argsString ) ; return cordova . raw . prepare ( callArgs ) ; } ) ; } ) ; return promise ; } ) ; }
Method to prepare the platforms
Method to prepare the platforms