mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-07-08 00:10:39 +08:00
loading js files using requirejs
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user