[Pkg-javascript-commits] [node-umd] 01/07: Pass empty dependency array for AMD to prevent dependency scanning

Bastien Roucariès rouca at moszumanska.debian.org
Mon Apr 17 07:38:10 UTC 2017


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

rouca pushed a commit to annotated tag 2.1.0
in repository node-umd.

commit fc1df10f9601b715b6d877d7538e9cb5945a1de9
Author: jrburke <jrburke at gmail.com>
Date:   Sat Jan 11 21:17:06 2014 -0800

    Pass empty dependency array for AMD to prevent dependency scanning
---
 template.js   | 2 +-
 test/index.js | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/template.js b/template.js
index 45eb948..2a9bbb9 100644
--- a/template.js
+++ b/template.js
@@ -5,7 +5,7 @@
 
   // RequireJS
   } else if (typeof define === "function" && define.amd) {
-    define(f);
+    define([], f);
 
   // <script>
   } else {
diff --git a/test/index.js b/test/index.js
index 7b20234..af1e505 100644
--- a/test/index.js
+++ b/test/index.js
@@ -14,8 +14,8 @@ describe('with CommonJS', function () {
 describe('with amd', function () {
   it('uses define', function () {
     var defed
-    function define(fn) {
-      defed = fn()
+    function define(d, fn) {
+      defed = (typeof d === 'function' ? d: fn)()
     }
     define.amd = true
     Function('define', src)(define)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-umd.git



More information about the Pkg-javascript-commits mailing list