nl_tokens: Downloads via npm or via git clone ( tries both ) Returns a Promise
pl_tokens: function downloadPlatform ( projectRoot , platform , <mask> , opts ) { var target = version ? ( platform + '@' + version ) : platform ; return Promise . resolve ( ) . then ( function ( ) { // append cordova to platform if ( platform in platforms ) { target = 'cordova-' + target ; } // gitURLs don't supply a platform, it equals null if ( ! platform ) { target = version ; } events . emit ( 'log' , 'Using cordova-fetch for ' + target ) ; return fetch ( target , projectRoot , opts ) ; } ) . catch ( function ( error ) { var message = 'Failed to fetch platform ' + target + '\nProbably this is either a connection problem, or platform spec is incorrect.' + '\nCheck your connection and platform name/version/URL.' + '\n' + error ; return Promise . reject ( new CordovaError ( message ) ) ; } ) . then ( function ( libDir ) { return require ( './index' ) . getPlatformDetailsFromDir ( libDir , platform ) ; } ) ; }