Fantasy Football Start Sit: Jacoby Brissett is Start of the Week
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. For example, libs suggests a directory containing third-party libraries. fly likely represents custom code within the project.
* Nested Keys: These are the module names.
* Values: These are the corresponding file paths. These can be relative paths (relative to the configuration file) or URLs.
Examples from paths:
* ".custom":"2.6.2": The module named .custom is located at a file or URL with the version 2.6.2. The leading dot suggests it might be a special module.
* "libs/velocity":"1.2.2": The velocity library is located in the libs directory at version 1.2.2.
* "libs/jquery/ui/jquery.ui.datepicker":"1.11.4": The jQuery UI Datepicker is located deep within the libs/jquery/ui directory at version 1.11.4.
* "facebook":"https://connect.facebook.net/en_US/sdk.js": The Facebook SDK is loaded directly from a CDN (Content Delivery Network).
2. shim:
This section is crucial for dealing with libraries that don’t follow the standard asynchronous module definition (AMD) format that RequireJS expects. Many older or customary JavaScript libraries are not designed to be loaded as modules. shim tells RequireJS how to load these libraries and their dependencies.
* Key: The name of the library that needs shimming.
* Value: an object with the following properties:
* deps: An array of module names that the shimmed library depends on. RequireJS will ensure these dependencies are loaded before the shimmed library.
* exports: (Optional) A string representing the global variable that the shimmed library creates. This allows you to access the library’s functionality through require(). For example, if a library creates a global variable named Marionette, you’d set exports: "Marionette".
Examples from shim:
* "liveconnection/managers/connection":{"deps":["liveconnection/libs/sockjs-0.3.4"]}: The liveconnection/managers/connection module depends on liveconnection/libs/sockjs-0.3.4.RequireJS will load sockjs-0.3.4 first.
* "fly/libs/backbone.marionette":{"deps":["jquery","version!fly/libs/underscore","version!fly/libs/backbone"],"exports":"Marionette"}: backbone.marionette depends on jQuery, underscore, and backbone. It exports a global variable named Marionette.
* "libs/jquery/ui/jquery.ui.tabs-1.11.4":["jquery","version!libs/jquery/ui/jquery.ui.core","version!fly/libs/jquery.widget"]: jQuery UI Tabs depends on jQuery, jQuery UI Core, and a custom widget library.
3.map:
This section defines mappings for module names, allowing for versioning or aliasing. The * indicates that these mappings apply globally.
* Key: The module name to be mapped.
* Value: The target module name or URL.
Examples from map:
* "adobe-pass":"https://sports.cbsimg.net/js/CBSi/app/VideoPlayer/AdobePass-min.js": Whenever you require('adobe-pass'), it will actually load the specified URL.
* `”facebook
