Added require.js shims for underscore and backbone

This is necessary since underscore and backbone are no longer AMD
modules.
This commit is contained in:
Jonathan Frederic 2013-12-30 08:10:51 -08:00 committed by Jonathan Frederic
parent b588a56f76
commit 3361826b5a
3 changed files with 16 additions and 5 deletions

View File

@ -21,8 +21,8 @@
// Use require.js 'define' method so that require.js is intelligent enough to
// syncronously load everything within this file when it is being 'required'
// elsewhere.
define(["components/underscore/underscore-min",
"components/backbone/backbone-min",
define(["underscore",
"backbone",
], function (underscore, backbone) {
//--------------------------------------------------------------------

View File

@ -15,8 +15,8 @@
**/
define(["notebook/js/widgetmanager",
"components/underscore/underscore-min",
"components/backbone/backbone-min"],
"underscore",
"backbone"],
function(widget_manager, underscore, backbone){
//--------------------------------------------------------------------

View File

@ -21,7 +21,18 @@
require.config({
baseUrl: '{{static_url("")}}',
paths: {
nbextensions : '{{ base_project_url }}nbextensions'
nbextensions : '{{ base_project_url }}nbextensions',
underscore : '{{static_url()}}components/underscore/underscore-min',
backbone : '{{static_url()}}components/backbone/backbone-min',
},
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: ["underscore", "jquery"],
exports: "Backbone"
}
}
});
</script>