Description
While developing/debugging, it would be nice to have shorter iterations that the one minute it takes to "grunt dist". I tried "grunt build" and used:
requirejs.config({
//By default load any module IDs from js/lib
baseUrl: '/bower_components/graphviz-d3-renderer/src/js',
//except, if the module ID starts with "app",
//load it from the js/app directory. paths
//config is relative to the baseUrl, and
//never includes a ".js" extension since
//the paths config could be for a directory.
paths: {
d3: '/bower_components/d3/d3',
"dot-checker": '/bower_components/graphviz-d3-renderer/src/js/dot-checker',
"layout-worker": '/bower_components/graphviz-d3-renderer/src/js/layout-worker',
worker: '/bower_components/requirejs-web-workers/src/worker',
renderer: '/bower_components/graphviz-d3-renderer/src/js/renderer'
}
});
But in Chrome Version 57.0.2987.110 (64-bit) on Ubuntu 14.04, I get:
layout-worker.js:18 Uncaught DOMException: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': TypeError: viz is not a function could not be cloned.
at onmessage (http://madrox.netinsight.se:8084/bower_components/graphviz-d3-renderer/src/js/layout-worker.js:18:9)
layout-worker.js:18 Uncaught DataCloneError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': TypeError: viz is not a function could not be cloned.
And with Firefox 48.0 on Ubuntu 14.04, I get:
DataCloneError: The object could not be cloned.layout-worker.js:18
Is there a better way? graphviz.it has "grunt development", but not graph-viz-d3-js