-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from Carreau/no-global
Start working on removing global JS IPython
- Loading branch information
Showing
36 changed files
with
173 additions
and
212 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,84 @@ | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
|
||
var IPython = IPython || {}; | ||
define([], function(){ | ||
|
||
var Jupyter = Jupyter || {}; | ||
|
||
var jprop = function(name, module_path){ | ||
Object.defineProperty(Jupyter, name, { | ||
get: function() { | ||
console.warn('accessing `'+name+'` is deprecated. Use `require("'+module_path+'")`'); | ||
return require(module_path); | ||
}, | ||
enumerable: true, | ||
configurable: false | ||
}); | ||
} | ||
|
||
var jglobal = function(name, module_path){ | ||
Object.defineProperty(Jupyter, name, { | ||
get: function() { | ||
console.warn('accessing `'+name+'` is deprecated. Use `require("'+module_path+'").'+name+'`'); | ||
return require(module_path)[name]; | ||
}, | ||
enumerable: true, | ||
configurable: false | ||
}); | ||
} | ||
|
||
define(function(){ | ||
"use strict"; | ||
IPython.version = "4.0.0.dev"; | ||
IPython._target = '_blank'; | ||
return IPython; | ||
|
||
// expose modules | ||
|
||
jprop('utils','base/js/utils') | ||
|
||
//Jupyter.load_extensions = Jupyter.utils.load_extensions; | ||
// | ||
jprop('security','base/js/security'); | ||
jprop('keyboard','base/js/keyboard'); | ||
jprop('dialog','base/js/dialog'); | ||
jprop('mathjaxutils','notebook/js/mathjaxutils'); | ||
|
||
|
||
//// exposed constructors | ||
jglobal('CommManager','services/kernels/comm') | ||
jglobal('Comm','services/kernels/comm') | ||
|
||
jglobal('NotificationWidget','base/js/notificationwidget'); | ||
jglobal('Kernel','services/kernels/kernel'); | ||
jglobal('Session','services/sessions/session'); | ||
jglobal('LoginWidget','auth/js/loginwidget'); | ||
jglobal('Page','base/js/page'); | ||
|
||
// notebook | ||
jglobal('TextCell','notebook/js/textcell'); | ||
jglobal('OutputArea','notebook/js/outputarea'); | ||
jglobal('KeyboardManager','notebook/js/keyboardmanager'); | ||
jglobal('Completer','notebook/js/completer'); | ||
jglobal('Notebook','notebook/js/notebook'); | ||
jglobal('Tooltip','notebook/js/tooltip'); | ||
jglobal('Toolbar','notebook/js/toolbar'); | ||
jglobal('SaveWidget','notebook/js/savewidget'); | ||
jglobal('Pager','notebook/js/pager'); | ||
jglobal('QuickHelp','notebook/js/quickhelp'); | ||
jglobal('MarkdownCell','notebook/js/textcell'); | ||
jglobal('RawCell','notebook/js/textcell'); | ||
jglobal('Cell','notebook/js/cell'); | ||
jglobal('MainToolBar','notebook/js/maintoolbar'); | ||
jglobal('NotebookNotificationArea','notebook/js/notificationarea'); | ||
jglobal('NotebookTour', 'notebook/js/tour'); | ||
jglobal('MenuBar', 'notebook/js/menubar'); | ||
|
||
// tree | ||
jglobal('SessionList','tree/js/sessionlist'); | ||
jglobal('ClusterList','tree/js/clusterlist'); | ||
jglobal('ClusterItem','tree/js/clusterlist'); | ||
|
||
Jupyter.version = "4.0.0.dev"; | ||
Jupyter._target = '_blank'; | ||
return Jupyter; | ||
}); | ||
|
||
// deprecated since 4.0, remove in 5+ | ||
var IPython = Jupyter |
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
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
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
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
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
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
Oops, something went wrong.