mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
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:
parent
b588a56f76
commit
3361826b5a
@ -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) {
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -15,8 +15,8 @@
|
||||
**/
|
||||
|
||||
define(["notebook/js/widgetmanager",
|
||||
"components/underscore/underscore-min",
|
||||
"components/backbone/backbone-min"],
|
||||
"underscore",
|
||||
"backbone"],
|
||||
function(widget_manager, underscore, backbone){
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user