Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*jslint browser: true, devel: true */
- (function () {
- 'use strict';
- requirejs.config({
- "paths": {
- "jquery" : [
- "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min", //fetch jQuery from CDN
- "lib/jquery" //Fallback to local copy
- ],
- "swiper": "plugin/idangerous.swiper.min",
- "imagesLoaded": "plugin/jquery.imagesloaded",
- "endecaAutoSuggest": "global/endeca-auto-suggest",
- "jquery.form": "module/jquery.form",
- "validation-base": "plugin/jquery.validate",
- "validation": "global/validation_config",
- "bootstrap": "lib/bootstrap",
- "gist": "module/gist-localstorage-polyfill",
- "underscore": "lib/underscore",
- "breakpoints": "plugin/breakpoints",
- "cookie": "lib/jquery.cookie",
- "menuAim": "plugin/jquery.menu-aim"
- },
- "shim": {
- "imagesLoaded": {"deps": ["jquery"], "exports": "$.fn.imagesLoaded"},
- "jquery.form": {"deps": ["jquery"], "exports": "$.fn.jqueryForm"},
- "endecaAutoSuggest": {"deps": ["jquery"], "exports": "$.fn.endecaSearchSuggest"},
- "validation-base": {"deps": ["jquery"], "exports": "$.fn.validate"},
- "bootstrap": {"deps": ["jquery"], "exports": "$.fn.modal"},
- "gist": {"exports": "window.localStorage"},
- "underscore": {"exports": "_"},
- "breakpoints": {"deps": ["jquery"], "exports": "$.fn.setBreakpoints"},
- "plugin/jquery.fancybox.pack": {"deps": ["jquery"], "exports": "$.fn.fancybox"},
- "plugin/jquery.placeholder.min": {"exports": "$.fn.placeholder"},
- "cookie": {"deps": ["jquery"], "exports": "$.fn.cookie"},
- "menuAim": {"deps": ["jquery"], "exports": "$.fn.menuAim"}
- }
- });
- //libs
- require(["jquery"], function ($) {
- //Bring in all global modules
- require(["global/global"]);
- //Parse script tag for page definition, and load approriate module
- var pageModule = $("script[data-main][data-controller]").attr("data-controller");
- if (pageModule) {
- require([pageModule]);
- }
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement