Created
March 31, 2012 06:36
-
-
Save ymichael/2260029 to your computer and use it in GitHub Desktop.
main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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