Skip to content

Instantly share code, notes, and snippets.

@jonbca
Created July 30, 2012 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbca/3208340 to your computer and use it in GitHub Desktop.
Save jonbca/3208340 to your computer and use it in GitHub Desktop.
Using requirejs with Backbone
require.config({
shim: {
backbone: {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
underscore: {
exports: '_'
}
},
paths: {
backbone: '//cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.2/backbone-min',
underscore: '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min',
jquery: '//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment