Regarding this entry Loading Backbone and Underscore using RequireJS it is quite clear to me how do I configure Backbone-specific scripts and JQuery.
But how do I:
- configure
Twitter bootstrap.js? - what about
json2.js?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In addition to what you learned about the path config option, you should also review the shim config option http://requirejs.org/docs/api.html#config-shim.
Many plugins are not AMD ready so you have two options. Either configure it as a shim (suitable for most plugins), or write your own adapters like the efforts at https://github.com/amdjs
Simple example:
For something like json2 which has no dependencies and only activates if the browser has no native implementation, you can simply list it as a dependency of your main application’s require without a wrapper / shim.