{"action":"created","issue":{"url":"https://api.github.com/repos/jrburke/requirejs/issues/1306","labels_url":"https://api.github.com/repos/jrburke/requirejs/issues/1306/labels{/name}","comments_url":"https://api.github.com/repos/jrburke/requirejs/issues/1306/comments","events_url":"https://api.github.com/repos/jrburke/requirejs/issues/1306/events","html_url":"https://github.com/jrburke/requirejs/issues/1306","id":60823552,"number":1306,"title":"What is the best practice for loading in all jQuery plugins at the same time? Perhaps include \"co-dependency\" instead of regular deps?","user":{"login":"TheSpiderPig","id":5693958,"avatar_url":"https://avatars.githubusercontent.com/u/5693958?v=3","gravatar_id":"","url":"https://api.github.com/users/TheSpiderPig","html_url":"https://github.com/TheSpiderPig","followers_url":"https://api.github.com/users/TheSpiderPig/followers","following_url":"https://api.github.com/users/TheSpiderPig/following{/other_user}","gists_url":"https://api.github.com/users/TheSpiderPig/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSpiderPig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSpiderPig/subscriptions","organizations_url":"https://api.github.com/users/TheSpiderPig/orgs","repos_url":"https://api.github.com/users/TheSpiderPig/repos","events_url":"https://api.github.com/users/TheSpiderPig/events{/privacy}","received_events_url":"https://api.github.com/users/TheSpiderPig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-12T14:06:12Z","updated_at":"2015-03-16T12:29:25Z","closed_at":null,"body":"I want to be able to load in ALL jquery plugins without having to specify between them (since they all would export the same $ variable. and wouldnt make sense to have plugin1('selector').pluginFeature()  ) \r\n\r\nessentially i want:\r\n\r\n    define( 'jquery', function( $) { \r\n      // all jquery plugins will be loaded and accessible here \r\n    })\r\n\r\n\r\ninstead of: \r\n\r\n    define('jquery', 'plugin1', 'plugin2', 'plugin3', \r\n           function($, $1, $2, $3) {\r\n                   //use them here  \r\n    });\r\n\r\nMy solution has been to include jquery twice to indicate that the libraries are both dependencies:\r\n\r\n\r\n          require.config({\r\n            paths: {\r\n                'jquery_lib': 'libs/jquery/dist/jquery',\r\n                'jquery': 'libs/jquery/dist/jquery.min',\r\n                'jquery.cycle': 'libs/jquery.cycle/jquery.cycle.all',\r\n                'jquery.rss': 'libs/jquery-rss/dist/jquery.rss.min',\r\n                'jquery.spservice': 'libs/sp-services/jquery.SPServices-0.7.2.min',\r\n                'jquery.marquee': 'libs/jQuery.Marquee/jquery.marquee.min',\r\n                'jquery.fittext': 'libs/FitText.js/jquery.fittext'\r\n            }, \r\n            shim: {\r\n\r\n                'jquery.cycle': {\r\n                    deps: [ 'jquery_lib']\r\n                },\r\n                'jquery.spservice': {\r\n                    deps: ['jquery_lib']\r\n                },\r\n                'jquery.marquee': {\r\n                    deps: ['jquery_lib']\r\n                },\r\n                'jquery.rss': {\r\n                    deps: ['jquery_lib']\r\n                },\r\n                'jquery': {\r\n                    deps: ['jquery_lib', \r\n                           'jquery.cycle', \r\n                           'jquery.rss',\r\n                           'jquery.spservice', \r\n                           'jquery.marquee',\r\n                           'jquery.fittext'],\r\n                    exports: '$'\r\n                }\r\n            }\r\n        }); \r\n\r\n\r\n\r\nIs there a better way to do this? "},"comment":{"url":"https://api.github.com/repos/jrburke/requirejs/issues/comments/81620045","html_url":"https://github.com/jrburke/requirejs/issues/1306#issuecomment-81620045","issue_url":"https://api.github.com/repos/jrburke/requirejs/issues/1306","id":81620045,"user":{"login":"rjgotten","id":442808,"avatar_url":"https://avatars.githubusercontent.com/u/442808?v=3","gravatar_id":"","url":"https://api.github.com/users/rjgotten","html_url":"https://github.com/rjgotten","followers_url":"https://api.github.com/users/rjgotten/followers","following_url":"https://api.github.com/users/rjgotten/following{/other_user}","gists_url":"https://api.github.com/users/rjgotten/gists{/gist_id}","starred_url":"https://api.github.com/users/rjgotten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjgotten/subscriptions","organizations_url":"https://api.github.com/users/rjgotten/orgs","repos_url":"https://api.github.com/users/rjgotten/repos","events_url":"https://api.github.com/users/rjgotten/events{/privacy}","received_events_url":"https://api.github.com/users/rjgotten/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T12:29:25Z","updated_at":"2015-03-16T12:29:25Z","body":"> Is there a better way to do this? \r\n\r\nhttps://github.com/rjgotten/require-plug\r\n\r\nYou're welcome. ;-)"}}