[Pkg-javascript-commits] [d3-tip.js] 268/277: Use require to load d3 in the CommonJS loader, and export d3-tip directly

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository d3-tip.js.

commit b6d5eab3ad1445194d0887d294d4c099c8debdc2
Author: Tim van der Horst <tim.vanderhorst at sportsmedglobal.com>
Date:   Fri Aug 12 09:23:22 2016 +1000

    Use require to load d3 in the CommonJS loader, and export d3-tip directly
---
 index.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/index.js b/index.js
index 4b6164c..2098d49 100644
--- a/index.js
+++ b/index.js
@@ -9,10 +9,8 @@
     define(['d3'], factory)
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS
-    module.exports = function(d3) {
-      d3.tip = factory(d3)
-      return d3.tip
-    }
+    var d3 = require('d3')
+    module.exports = factory(d3)
   } else {
     // Browser global.
     root.d3.tip = factory(root.d3)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git



More information about the Pkg-javascript-commits mailing list