Bears vs Vikings Player Props: Odds, Picks & Alt Lines
This is a configuration file, likely for a JavaScript module loader like RequireJS. Let’s break down what it contains:
1. paths:
This section defines the mapping between logical module names (used in require() calls in your JavaScript code) and the actual file paths where those modules are located. It’s organized into nested objects.
Top-Level Keys: These represent base paths or categories of modules. Such as, libs suggests a directory containing third-party libraries. fly likely represents custom code within the project.
Values: The values are the paths to the JavaScript files. These can be relative paths (relative to the location of the configuration file) or absolute URLs.
Key Observations about paths:
jQuery UI: A large number of jQuery UI components are listed, indicating heavy use of this library. They’re versioned (e.g., jquery.ui.tabs-1.11.4). jQuery Plugins: Many jQuery plugins are included (e.g.,dotdotdot,flexslider,lazyload,marquee,numberformatter,scrollbar,tablesorter,touchswipe).
DataTables: DataTables is used, along with extensions fixedColumns and fixedHeader.
Waypoints: The Waypoints library is used for scroll-based animations and effects.
Live Connection: There’s a section for liveconnection, which likely handles real-time dialog using SockJS.
Custom Code: The fly directory contains custom code, including Underscore.js and Backbone.js.
Versioned Paths: The version! prefix (e.g., version!fly/libs/underscore) is a RequireJS feature. It’s used to ensure that a specific version of a module is loaded, even if a newer version is available. This is critically important for maintaining compatibility.
External URLs: Some modules are loaded from external URLs (e.g.,https://sports.cbsimg.net/js/CBSi/app/VideoPlayer/AdobePass-min.js, https://connect.facebook.net/en_US/sdk.js).
2. shim:
This section is crucial for dealing with modules that don’t follow the standard AMD (Asynchronous Module Definition) format that RequireJS expects. Many older or traditional JavaScript libraries don’t use AMD. shim tells RequireJS how to load these modules and their dependencies.
Key: The key is the module name (the name you’ll use in require()).
deps: An array of dependencies that the module requires. RequireJS will load these dependencies before loading the module itself.
exports: If the module exposes a global variable (e.g., attaches something to the window object), you specify that variable name here. This allows RequireJS to make that global variable available as a module.
Key observations about shim:
SockJS: liveconnection/libs/sockjs-0.3.4 is shimmed to expose SockJS globally. setValueFromArray/getValueFromArray: These are shimmed to expose set and get respectively.
Backbone.js and Marionette: Backbone.js and its Marionette extension are shimmed, specifying their dependencies on jQuery and Underscore.js.
jQuery UI Tabs: The jQuery UI Tabs module depends on jQuery, the core jQuery UI, and a custom jquery.widget module.
Flexslider: Depends on jQuery. datatables Extensions: dataTables.fixedColumns and dataTables.fixedHeader depend on jQuery and DataTables itself.
Adobe Pass: Adobe Pass depends on a utility script.
3. map:
This section defines aliases or mappings for modules. It’s used to resolve module names to different paths based on certain conditions.
:
