loading js files using requirejs

This commit is contained in:
floydpraveen
2013-08-17 03:29:44 +05:30
parent 6ac328dd44
commit e7e4253bfc
10 changed files with 1435 additions and 47 deletions
+31 -5
View File
@@ -1,6 +1,32 @@
var app = app || {};
var ENTER_KEY = 13;
require.config({
$(function(){
new app.Page();
});
paths: {
jquery: "vendor/jquery.min",
underscore: "vendor/underscore",
backbone: "vendor/backbone",
modernizr:"vendor/custom.modernizr",
socket:"vendor/socket.io.min",
lodash:"vendor/lodash.min"
},
shim: {
backbone: {
deps: ["underscore", "jquery"],
exports: "Backbone"
}
},
waitSeconds: 5
});
//start the app
require([
'views/page'
],
function( App ) {
new App();
});