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 you too refer to these files using the alias instead of the full path. For example:
* "libs/velocity": "1.2.2" means that when you require("libs/velocity"), the module loader will load the file at version 1.2.2.
* "jquery": "libs/jquery/jquery-1.11.4" means that when you require("jquery"), it will load the jQuery library.
* The structure shows a lot of jQuery plugins and other libraries being loaded. The libs/ prefix suggests these are located in a libs directory within your project.
* shim: This section is crucial for dealing with libraries that don’t use the standard RequireJS module definition (e.g., libraries that just define global variables). shim tells RequireJS how to load these libraries and their dependencies.
* liveconnection/managers/connection: This module depends on liveconnection/libs/sockjs-0.3.4. it tells RequireJS to load sockjs-0.3.4 before liveconnection/managers/connection.
* liveconnection/libs/sockjs-0.3.4: This library exports a global variable named SockJS.
* libs/setValueFromArray and libs/getValueFromArray: These also export global variables named set and get respectively.
* fly/libs/backbone.marionette: This depends on jQuery, fly/libs/underscore, and fly/libs/backbone. It exports a global variable named Marionette.
* fly/libs/underscore-1.5.1: Exports a global variable named _.
* fly/libs/backbone-1.0.0: Depends on fly/libs/underscore and jQuery, and exports a global variable named Backbone.
* libs/jquery/ui/jquery.ui.tabs-1.11.4: This jQuery UI tab component depends on jQuery, the core jQuery UI components (jquery.ui.core), and a utility library (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: Both depend on jQuery and DataTables.
* https://sports.cbsimg.net/js/CBSi/app/VideoPlayer/AdobePass-min.js: This depends on another CBSi utility script. This shows the configuration can also load scripts from 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": Loads 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 the module loader:
* Were to find various JavaScript libraries and modules.
* how to load libraries that don’t follow the standard module definition (using shim).
