diff options
| -rw-r--r-- | TODO | 2 | ||||
| -rw-r--r-- | scripts/buttons.js | 2 | ||||
| -rw-r--r-- | scripts/drag_n_drop.js | 2 | ||||
| -rw-r--r-- | scripts/history.js | 2 | ||||
| -rw-r--r-- | scripts/main.js | 2 | ||||
| -rw-r--r-- | scripts/rz_core.js (renamed from scripts/rhizicore.js) | 2 | ||||
| -rw-r--r-- | scripts/textanalysis.ui.js | 2 | ||||
| -rw-r--r-- | tests/base.js | 6 | ||||
| -rw-r--r-- | tests/test_analyzer.js | 4 |
9 files changed, 12 insertions, 12 deletions
@@ -1,6 +1,6 @@ This is generic, not yet divided into a bunch of actionable items: -break down rhizicore.js +break down rz_core.js reduce amount of globals to 1. make it testable without a browser, not using some headless automation - node stuff. diff --git a/scripts/buttons.js b/scripts/buttons.js index ef56594d..19c772eb 100644 --- a/scripts/buttons.js +++ b/scripts/buttons.js @@ -1,6 +1,6 @@ "use strict" -define('buttons', ['jquery', 'FileSaver', 'rhizicore'], function ($, saveAs, RZ) { +define('buttons', ['jquery', 'FileSaver', 'rz_core'], function ($, saveAs, RZ) { $('.tutorial').click(function(){}); var key="#47989379"; diff --git a/scripts/drag_n_drop.js b/scripts/drag_n_drop.js index 0f16c6fd..1669a58a 100644 --- a/scripts/drag_n_drop.js +++ b/scripts/drag_n_drop.js @@ -1,4 +1,4 @@ -define('drag_n_drop', ['jquery', 'jquery-ui', 'rhizicore'], function($, __unused_jqueryui, RZ) { +define('drag_n_drop', ['jquery', 'jquery-ui', 'rz_core'], function($, __unused_jqueryui, RZ) { function init() { console.log('rhizi: init drag-n-drop'); diff --git a/scripts/history.js b/scripts/history.js index 72f9e846..3e231329 100644 --- a/scripts/history.js +++ b/scripts/history.js @@ -6,7 +6,7 @@ // exceptions but that shouldn't break the console, as evidenced by the '__commandLineAPI is not defined' // error below. // -// Uncaught TypeError: Can't add property addednodes, object is not extensible rhizicore.js:4 +// Uncaught TypeError: Can't add property addednodes, object is not extensible rz_core.js:4 // Uncaught TypeError: Can't add property text, object is not extensible textanalysis.js:3 // Uncaught TypeError: Can't add property key, object is not extensible buttons.js:5 // Uncaught ReferenceError: sentence is not defined robot.js:11 diff --git a/scripts/main.js b/scripts/main.js index 1c029b2d..bc246925 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -1,4 +1,4 @@ -define('main', ['rhizicore', 'textanalysis.ui', 'buttons', 'history', 'drag_n_drop', 'robot'], +define('main', ['rz_core', 'textanalysis.ui', 'buttons', 'history', 'drag_n_drop', 'robot'], function(RZ, textanalysis_ui, buttons, history, drag_n_drop, robot) { return { main: function() { diff --git a/scripts/rhizicore.js b/scripts/rz_core.js index 588e240a..3a55839c 100644 --- a/scripts/rhizicore.js +++ b/scripts/rz_core.js @@ -1,6 +1,6 @@ "use strict" -define('rhizicore', +define('rz_core', ['jquery', 'd3', 'consts', 'signal', 'util', 'model/graph'], function($, d3, consts, signal, util, model_graph) { diff --git a/scripts/textanalysis.ui.js b/scripts/textanalysis.ui.js index 503e5796..946ce0d5 100644 --- a/scripts/textanalysis.ui.js +++ b/scripts/textanalysis.ui.js @@ -1,6 +1,6 @@ "use strict" -define('textanalysis.ui', ['autocomplete', 'rhizicore', 'textanalysis', 'signal', 'consts'], +define('textanalysis.ui', ['autocomplete', 'rz_core', 'textanalysis', 'signal', 'consts'], function(autocomplete, RZ, textanalysis, signal, consts) { var text = ""; // Last text of sentence var element_name = '#textanalyser'; diff --git a/tests/base.js b/tests/base.js index 6ec22cf6..72ce28b4 100644 --- a/tests/base.js +++ b/tests/base.js @@ -64,17 +64,17 @@ function run_tests(settings) { } function reset(window) { - window.require('rhizicore').graph.clear(); + window.require('rz_core').graph.clear(); } function nodes(window) { - return window.require('rhizicore').force.nodes().map(function (n) { + return window.require('rz_core').force.nodes().map(function (n) { return n.name; }); } function links(window) { - return window.require('rhizicore').force.links().map(function (l) { + return window.require('rz_core').force.links().map(function (l) { debugger; return [l.source.name, l.target.name, l.name]; }); diff --git a/tests/test_analyzer.js b/tests/test_analyzer.js index 0df43e49..441f0dde 100644 --- a/tests/test_analyzer.js +++ b/tests/test_analyzer.js @@ -22,7 +22,7 @@ base.run_tests({ var analyzeSentence = window.require('textanalysis.ui').analyzeSentence; if (process.argv.length > 2) { analyzeSentence(process.argv.slice(2).join(" "), true); - base.dump_graphviz(window.require('rhizicore').force); + base.dump_graphviz(window.require('rz_core').force); } else { for (var k = 0; k < data.length; ++k) { var sentence = data[k][0]; @@ -41,7 +41,7 @@ base.run_tests({ console.log('expected: ' + expected_links); console.log('got: ' + links); } - base.dump_graphviz(window.require('rhizicore').force); + base.dump_graphviz(window.require('rz_core').force); } } process.exit(); |
