This is a configuration file, likely for a JavaScript module loader like RequireJS. Let’s break down what it contains:
1. config Section:
* paths: This is the core of the configuration.It defines aliases (short names) for JavaScript files and libraries. This allows your code to refer to libraries using these aliases instead of their full paths. For example:
* "libs/velocity": "1.2.2" means that when your code uses require('libs/velocity'), it will load the file corresponding to version 1.2.2 of the Velocity library.
* "jquery": "libs/jquery/jquery-1.11.4" This is a common pattern – aliasing the core jQuery library.
* The structure shows a lot of jQuery plugins and UI components are being used.
* "libs/jquery/ui/jquery.ui.core": "1.11.4" and similar entries define versions for jQuery UI components.
* shim: This section is crucial for dealing with libraries that don’t follow the standard asynchronous module definition (AMD) format that RequireJS expects. These libraries frequently enough rely on global variables or have dependencies that need to be loaded in a specific order.
* liveconnection/managers/connection: This module depends on liveconnection/libs/sockjs-0.3.4. The shim ensures that sockjs-0.3.4 is loaded before liveconnection/managers/connection.
* liveconnection/libs/sockjs-0.3.4: This library exports a global variable named SockJS. The exports: "SockJS" tells RequireJS to make that global variable available as a module.
* libs/setValueFromArray and libs/getValueFromArray: These also export global variables (set and get respectively).
* fly/libs/backbone.marionette: This depends on jQuery, Underscore, and Backbone. It also exports Marionette.
* fly/libs/underscore-1.5.1 and fly/libs/backbone-1.0.0: These define exports for Underscore and Backbone.
* libs/jquery/ui/jquery.ui.tabs-1.11.4: This depends on jQuery, jQuery UI core, and fly/libs/jquery.widget.
* libs/jquery/flexslider-2.1: Depends on jQuery.
* libs/dataTables.fixedColumns-3.0.4 and libs/dataTables.fixedHeader-2.1.2: Depend on jQuery and DataTables.
* https://sports.cbsimg.net/js/cbsi/app/VideoPlayer/AdobePass-min.js: Depends on https://sports.cbsimg.net/js/CBSi/util/Utils-min.js. This shows the configuration can also include external URLs.
* map: This section defines how module names are mapped to URLs. It’s used for resolving module identifiers.
* "*":{"adobe-pass":"https://sports.cbsimg.net/js/CBSi/app/VideoPlayer/AdobePass-min.js"}: This means that whenever you require('adobe-pass'), it will load the specified URL.
* "*":{"facebook":"https://connect.facebook.net/en_US/sdk.js"}: Similarly, require('facebook') will load the Facebook SDK.
* "*":{"facebook-debug":"https://connect.facebook.net/en_US/all/deb"}: Loads the Facebook SDK in debug mode.
In Summary:
This configuration file is designed to manage the dependencies of a JavaScript application. It tells requirejs:
* Where to find various libraries (jQuery, Velocity, DataTables,
