diff --git a/bower.json b/bower.json index 73d3b0e..0c9d8b9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "d3-tip", - "version": "0.6.5", + "version": "0.6.6", "main": "index.js", "ignore": [ "**/.*", diff --git a/index.js b/index.js index 1310f35..13b1e40 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,12 @@ if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module with d3 as a dependency. define(['d3'], factory) + } else if (typeof module === 'object' && module.exports) { + // CommonJS + module.exports = function(d3) { + d3.tip = factory(d3) + return d3.tip + } } else { // Browser global. root.d3.tip = factory(root.d3) diff --git a/package.json b/package.json new file mode 100644 index 0000000..abc2323 --- /dev/null +++ b/package.json @@ -0,0 +1,28 @@ +{ + "name": "d3-tip", + "version": "0.6.6", + "description": "Tooltips for d3 svg visualizations", + "author": "Justin Palmer (http://labratrevenge.com/d3-tip)", + "main": "index.js", + "directories": { + "doc": "docs", + "example": "examples" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/Caged/d3-tip" + }, + "keywords": [ + "d3", + "tooltip" + ], + "author": "Justin Palmer", + "license": "MIT", + "bugs": { + "url": "https://github.com/Caged/d3-tip/issues" + }, + "homepage": "https://github.com/Caged/d3-tip" +}