Skip to content

Instantly share code, notes, and snippets.

@ymichael
Created March 31, 2012 06:36
Show Gist options
  • Save ymichael/2260029 to your computer and use it in GitHub Desktop.
Save ymichael/2260029 to your computer and use it in GitHub Desktop.
main.js
require.config({
paths: {
// i use jquery cdn to speed up my page load
'jquery': "http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min",
'underscore': "libs/underscore",
'backbone': "libs/backbone",
// other scripts
'ich': "libs/icanhazamd",
'ivle': "libs/ivle",
'mainapp' : "scripts/app", //this file contains the main app obj of my application.
'appmodels' : "scripts/models",
'appviews' : "scripts/views",
}
});
require(['mainapp'], //require my mainapp.
function(app){
var x = new app();
x.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment