Last active
September 18, 2017 19:33
-
-
Save JPGygax68/6065635 to your computer and use it in GitHub Desktop.
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.
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
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment