lib/ttb-cache.js
function getModuleVersionFromConfig(config) {
    if (config.moduleVersion === undefined && config.nodePackageName == CORDOVA) {
        // If no version is set, try to get the version from taco.json
        // This check is specific to the Cordova module
        if (utilities.fileExistsSync(path.join(config.projectPath, 'taco.json'))) {
            var version = require(path.join(config.projectPath, 'taco.json'))['cordova-cli'];
            
            if (version) {
                console.log('Cordova version set to ' + version + ' based on the contents of taco.json');
                return version;
            }
        }
    }
    
    return config.moduleVersion || process.env[makeDefaultEnvironmentVariable(config.nodePackageName)];
}
function getModuleVersionFromConfig(config) {
    if (config.moduleVersion === undefined && config.nodePackageName == CORDOVA) {
        // If no version is set, try to get the version from taco.json
        // This check is specific to the Cordova module
        if (utilities.fileExistsSync(path.join(config.projectPath, 'taco.json'))) {
            var version = require(path.join(config.projectPath, 'taco.json'))['cordova-cli'];
            
            if (version) {
                console.log('Cordova version set to ' + version + ' based on the contents of taco.json');
                return version;
            }
        }
    }
    
    return config.moduleVersion || process.env[makeDefaultEnvironmentVariable(config.nodePackageName)];
}
function getModuleVersionFromConfig ( config ) { if ( config . moduleVersion === undefined && config . nodePackageName == CORDOVA ) { // If no version is set, try to get the version from taco.json // This check is specific to the Cordova module if ( utilities . fileExistsSync ( path . join ( config . projectPath , 'taco.json' ) ) ) { var version = require ( path . join ( config . projectPath , 'taco.json' ) ) [ 'cordova-cli' ] ; if ( version ) { console . log ( 'Cordova version set to ' + version + ' based on the contents of taco.json' ) ; return version ; } } } return config . moduleVersion || process . env [ makeDefaultEnvironmentVariable ( config . nodePackageName ) ] ; }
Extracts the module version from a configuration
Extracts the module version from a configuration