Skip to content

Instantly share code, notes, and snippets.

@xjamundx
Last active December 13, 2015 19:19
Show Gist options
  • Save xjamundx/4961920 to your computer and use it in GitHub Desktop.
Save xjamundx/4961920 to your computer and use it in GitHub Desktop.
jqmobi with backbone + require.js
require.config({
paths: {
jquery: "lib/jqMobi.min",
underscore: "http://underscorejs.org/underscore-min",
backbone: "http://backbonejs.org/backbone"
},
shim: {
'backbone': {
deps: ['underscore', 'jquery'],
exports: 'Backbone',
init: function() {
Backbone.$ = window.$;
}
},
'underscore': {
exports: '_'
}
}
});
define(function (require) {
var Backbone = require('backbone')
// do something cool...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment