Module definition for node.js

Hi,
We are trying to use plottable to generate charts in Node.js, to be able to import Plottable we had to change several things:
- add module definition 
- shadow window, document and navigator objects
- add isSvg function (jsdom return  "SVG" as a nodName, so we had to check "svg" and "SVG" strings)

These changes allowed us to require Plottable but still we had to patch several functions to get a html string with valid svg chart. Here https://github.com/BrandwatchLtd/node-plottable you can find a node module that is using Plottable (it's an alpha version with patches).

The biggest issues that we have are related to calculation of the elements size (getBoundingClientRect in jsdom returns 0 values, we created a very simple function to hide overlapping labels and legends are not working because of calculation of the text dimensions), we found some memory leaks related to event listeners (they are patched as well).

 Could you let us know what do you think about this and if there is a plan to make plottable as a node package?
the problem is that that in node window/document/navigator objects are not declared in node as in browsers and d3 and plottable are using them, so to be able to use that in node we had to shadow them, so when we require Plottable to node we have to provide instance of those objects (they will be created via d3 which is using jsdom), you can check that in node-plottable repo https://github.com/BrandwatchLtd/node-plottable/blob/master/index.js#L21.

And yes the idea is to return Plottable as a module.