Skip to content

Instantly share code, notes, and snippets.

@comster
Created January 17, 2013 00:32
Show Gist options
  • Save comster/4552424 to your computer and use it in GitHub Desktop.
Save comster/4552424 to your computer and use it in GitHub Desktop.
<script src="/desktop/require.js"></script>
<script>
require(['index.js'], function(index){
index.init();
});
</script>
(function() {
var index = {};
index.init = function(callback) {
require([ "/desktop/jquery.js" ], function() {
$(document).ready(function() {
require([ "/desktop/underscore.js" ], function() {
require([ "/desktop/backbone.js" ], function() {
require([ "/desktop/backbone-house.js" ], function() {
require([ "/desktop/utils.js" ], function(utils) {
window.utils = utils;
require([ "myapp.js" ], function(BackboneApp) {
var app = new BackboneApp({el:$("body")[0]});
app.render();
callback();
});
});
});
});
});
});
});
};
if (define) {
define(function() {
return index;
});
}
})();
(function() {
var AppView = Backbone.View.extend({
tag: 'body',
className: 'app',
initialize: function() {
var self = this;
},
render: function() {
return this;
},
events: {
}
});
if(define) {
define(function () {
return AppView;
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment