Copy-paste example of a require.js configuration, including loading require.js from the "scripts" subdirectory. Indented two levels (2 spaces per level) for correct insertion in the document header.
<script type="text/javascript" src="scripts/require.js" data-main="app/main"></script>
<script>
requirejs.config({
paths: {
'underscore': 'lib/underscore',
'jquery' : 'lib/jquery-2.0.3',
'backbone' : 'lib/backbone',
'relational': 'lib/backbone-relational',
'css' : 'lib/css.min'
},
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: ["underscore", "jquery"],
exports: "Backbone"
},
relational: {
deps: ["backbone"]
}
}
});
</script>