diff --git a/notebook/static/base/js/events.js b/notebook/static/base/js/events.js index aed1e0f91a..a214291762 100644 --- a/notebook/static/base/js/events.js +++ b/notebook/static/base/js/events.js @@ -5,7 +5,7 @@ // before all other objects so it exists when others register event handlers. // To register an event handler: // -// require(['base/js/events'], function (events) { +// requirejs(['base/js/events'], function (events) { // events.on("event.Namespace", function () { do_stuff(); }); // }); diff --git a/notebook/static/base/js/namespace.js b/notebook/static/base/js/namespace.js index 741c60a48f..3aba2dc300 100644 --- a/notebook/static/base/js/namespace.js +++ b/notebook/static/base/js/namespace.js @@ -7,8 +7,8 @@ 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); + console.warn('accessing `'+name+'` is deprecated. Use `requirejs("'+module_path+'")`'); + return requirejs(module_path); }, enumerable: true, configurable: false @@ -18,8 +18,8 @@ var jprop = function(name, module_path){ 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]; + console.warn('accessing `'+name+'` is deprecated. Use `requirejs("'+module_path+'").'+name+'`'); + return requirejs(module_path)[name]; }, enumerable: true, configurable: false diff --git a/notebook/static/bidi/bidi.js b/notebook/static/bidi/bidi.js index 9ace652e0a..3d13d68b27 100644 --- a/notebook/static/bidi/bidi.js +++ b/notebook/static/bidi/bidi.js @@ -15,7 +15,7 @@ define(['bidi/numericshaping'], function(numericshaping) { document.body.dir = 'rtl'; } - require(['moment'], function (moment) { + requirejs(['moment'], function (moment) { console.log('Loaded moment locale', moment.locale(_uiLang())); }); diff --git a/notebook/static/custom/custom.js b/notebook/static/custom/custom.js index 4af700f6c5..bfece423ef 100644 --- a/notebook/static/custom/custom.js +++ b/notebook/static/custom/custom.js @@ -61,7 +61,7 @@ * 'base/js/events' * ], function(events) { * events.on('app_initialized.DashboardApp', function(){ - * require(['custom/unofficial_extension.js']) + * requirejs(['custom/unofficial_extension.js']) * }); * }); * diff --git a/notebook/static/edit/js/main.js b/notebook/static/edit/js/main.js index 9b2a2cb682..4ba10197d0 100644 --- a/notebook/static/edit/js/main.js +++ b/notebook/static/edit/js/main.js @@ -1,7 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -require([ +requirejs([ 'jquery', 'contents', 'base/js/namespace', diff --git a/notebook/static/notebook/js/about.js b/notebook/static/notebook/js/about.js index 073f121a7f..628a9f7e15 100644 --- a/notebook/static/notebook/js/about.js +++ b/notebook/static/notebook/js/about.js @@ -1,6 +1,6 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -require([ +requirejs([ 'jquery', 'base/js/dialog', 'base/js/i18n', diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index 3b4fe8ba47..d9836869c9 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -36,8 +36,8 @@ define([ Object.seal(this); }; - var $ = require('jquery'); - var events = require('base/js/events'); + var $ = requirejs('jquery'); + var events = requirejs('base/js/events'); /** * A bunch of predefined `Simple Actions` used by Jupyter. diff --git a/notebook/static/notebook/js/codemirror-ipython.js b/notebook/static/notebook/js/codemirror-ipython.js index 3dfa296653..4b05d36369 100644 --- a/notebook/static/notebook/js/codemirror-ipython.js +++ b/notebook/static/notebook/js/codemirror-ipython.js @@ -5,8 +5,8 @@ (function(mod) { if (typeof exports == "object" && typeof module == "object"){ // CommonJS - mod(require("codemirror/lib/codemirror"), - require("codemirror/mode/python/python") + mod(requirejs("codemirror/lib/codemirror"), + requirejs("codemirror/mode/python/python") ); } else if (typeof define == "function" && define.amd){ // AMD define(["codemirror/lib/codemirror", diff --git a/notebook/static/notebook/js/codemirror-ipythongfm.js b/notebook/static/notebook/js/codemirror-ipythongfm.js index fb2fb60dfd..e167c8005f 100644 --- a/notebook/static/notebook/js/codemirror-ipythongfm.js +++ b/notebook/static/notebook/js/codemirror-ipythongfm.js @@ -9,10 +9,10 @@ (function(mod) { if (typeof exports == "object" && typeof module == "object"){ // CommonJS - mod(require("codemirror/lib/codemirror") - ,require("codemirror/addon/mode/multiplex") - ,require("codemirror/mode/gfm/gfm") - ,require("codemirror/mode/stex/stex") + mod(requirejs("codemirror/lib/codemirror") + ,requirejs("codemirror/addon/mode/multiplex") + ,requirejs("codemirror/mode/gfm/gfm") + ,requirejs("codemirror/mode/stex/stex") ); } else if (typeof define == "function" && define.amd){ // AMD define(["codemirror/lib/codemirror" diff --git a/notebook/static/notebook/js/main.js b/notebook/static/notebook/js/main.js index 09175d4d16..5a1eaf4a5c 100644 --- a/notebook/static/notebook/js/main.js +++ b/notebook/static/notebook/js/main.js @@ -20,7 +20,7 @@ var bind = function bind(obj) { Function.prototype.bind = Function.prototype.bind || bind ; -require([ +requirejs([ 'jquery', 'contents', 'base/js/namespace', diff --git a/notebook/static/notebook/js/maintoolbar.js b/notebook/static/notebook/js/maintoolbar.js index 16bfeffa88..78bad6e0b1 100644 --- a/notebook/static/notebook/js/maintoolbar.js +++ b/notebook/static/notebook/js/maintoolbar.js @@ -7,7 +7,7 @@ define([ './toolbar', './celltoolbar', 'base/js/i18n' -], function($, require, toolbar, celltoolbar, i18n) { +], function($, requirejs, toolbar, celltoolbar, i18n) { "use strict"; var MainToolBar = function (selector, options) { diff --git a/notebook/static/services/contents.js b/notebook/static/services/contents.js index 867ddd470d..0425959b3e 100644 --- a/notebook/static/services/contents.js +++ b/notebook/static/services/contents.js @@ -1,11 +1,11 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -define(function(require) { +define(function(requirejs) { "use strict"; - var $ = require('jquery'); - var utils = require('base/js/utils'); + var $ = requirejs('jquery'); + var utils = requirejs('base/js/utils'); var Contents = function(options) { /** diff --git a/notebook/static/terminal/js/main.js b/notebook/static/terminal/js/main.js index bfaa23c038..92b1607538 100644 --- a/notebook/static/terminal/js/main.js +++ b/notebook/static/terminal/js/main.js @@ -1,7 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -require([ +requirejs([ 'jquery', 'base/js/utils', 'base/js/page', diff --git a/notebook/static/tree/js/main.js b/notebook/static/tree/js/main.js index 33b8bf09ad..ebced6b6f8 100644 --- a/notebook/static/tree/js/main.js +++ b/notebook/static/tree/js/main.js @@ -20,7 +20,7 @@ var bind = function bind(obj) { Function.prototype.bind = Function.prototype.bind || bind ; -require([ +requirejs([ 'jquery', 'contents', 'base/js/namespace',