Created
February 4, 2013 11:56
-
-
Save justinfay/4706331 to your computer and use it in GitHub Desktop.
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
// Set the aliases for the libraries used in the application | |
require.config({ | |
paths: { | |
jquery: 'libs/jquery-min', | |
underscore: 'libs/underscore-min', | |
backbone: 'libs/backbone-min', | |
request: 'libs/XMLHttpRequest', | |
mustache: 'libs/mustache-min', | |
templates: '../templates', | |
collapse: 'libs/bootstrap-collapse', | |
tab: 'libs/bootstrap-tab', | |
tooltip: 'libs/bootstrap-tooltip' | |
}, | |
// The shim for non AMD modules eg. Backbone and _ | |
// These require the dependencies that must be loaded prior to them | |
shim: { | |
jquery: { | |
exports: '$' | |
}, | |
underscore: { | |
exports: '_' | |
}, | |
backbone: { | |
deps: ['underscore', 'jquery'], | |
exports: 'Backbone' | |
}, | |
collapse: { | |
deps: ['jquery'], | |
exports: 'jQuery.fn.collapse' | |
}, | |
tab: { | |
deps: ['jquery'], | |
exports: 'jQuery.fn.tab' | |
}, | |
tooltip: { | |
deps: ['jquery'], | |
exports: 'jQuery.fn.tooltip' | |
} | |
} | |
}); | |
require([ | |
// Load our app module and pass it to our definition function | |
'app', | |
], function(App){ | |
App.initialize(); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment