##// END OF EJS Templates
de-require-config
Matthias BUSSONNIER -
Show More
@@ -8,16 +8,15 b''
8 8 //============================================================================
9 9 // Notebook
10 10 //============================================================================
11 "use strict";
12 11
13 12 /**
14 13 * @module IPython
15 14 * @namespace IPython
16 15 **/
17 16
18 define(function () {
17 var IPython = (function (IPython) {
19 18 /**
20 * A place where some stuff can be configured.
19 * A place where some stuff can be confugured.
21 20 *
22 21 * @class config
23 22 * @static
@@ -70,9 +69,10 b' define(function () {'
70 69 };
71 70
72 71 // use the same method to merge user configuration
73 var config = {};
74 $.extend(config, default_config);
72 IPython.config = {};
73 $.extend(IPython.config, default_config);
75 74
76 return config;
77 });
75 return IPython;
76
77 }(IPython));
78 78
@@ -14,15 +14,12 b''
14 14 // as injecting require.js make marked not to put itself in the globals,
15 15 // which make both this file fail at setting marked configuration, and textcell.js
16 16 // which search marked into global.
17 require(['static/components/marked/lib/marked.js',
18 'static/notebook/js/config.js'],
17 require(['static/components/marked/lib/marked.js'],
19 18
20 function (marked, config) {
21
22 IPython.config = config;
23 console.log('config is',config);
19 function (marked) {
24 20
25 21 window.marked = marked
22
26 23 // monkey patch CM to be able to syntax highlight cell magics
27 24 // bug reported upstream,
28 25 // see https://github.com/marijnh/CodeMirror2/issues/670
@@ -107,7 +104,6 b' function (marked, config) {'
107 104 $([IPython.events]).on('notebook_loaded.Notebook', first_load);
108 105 IPython.notebook.load_notebook($('body').data('notebookId'));
109 106
110 var marked;
111 107 if (marked) {
112 108 marked.setOptions({
113 109 gfm : true,
@@ -230,6 +230,7 b' class="notebook_app"'
230 230 <script src="{{ static_url("notebook/js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script>
231 231 <script src="{{ static_url("notebook/js/notificationarea.js") }}" type="text/javascript" charset="utf-8"></script>
232 232 <script src="{{ static_url("notebook/js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script>
233 <script src="{{ static_url("notebook/js/config.js") }}" type="text/javascript" charset="utf-8"></script>
233 234 <script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
234 235
235 236 <script src="{{ static_url("notebook/js/contexthint.js") }}" charset="utf-8"></script>
General Comments 0
You need to be logged in to leave comments. Login now