[Pkg-javascript-commits] [node-module-deps] 262/444: expose .globalTransforms

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:02 UTC 2017


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

rouca pushed a commit to branch master
in repository node-module-deps.

commit e95962f5e31af07a487e00fcd5d2def2fe6d3315
Author: James Halliday <mail at substack.net>
Date:   Sun Jul 20 18:33:09 2014 -0700

    expose .globalTransforms
---
 index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 6f9b108..afc92df 100644
--- a/index.js
+++ b/index.js
@@ -41,6 +41,7 @@ function Deps (opts) {
     if (!this.paths) this.paths = [];
     
     this.transforms = [].concat(opts.transform).filter(Boolean);
+    this.globalTransforms = [].concat(opts.globalTransform).filter(Boolean);
     this.resolver = opts.resolve || browserResolve;
     this.options = opts;
     this.pending = 0;
@@ -144,7 +145,10 @@ Deps.prototype.getTransforms = function (file, pkg) {
     });
     
     var transforms = [].concat(isTopLevel ? this.transforms : [])
-        .concat(getTransforms(pkg, this.options))
+        .concat(getTransforms(pkg, {
+            globalTransform: this.globalTransforms,
+            transformKey: this.options.transformKey
+        }))
     ;
     if (transforms.length === 0) return through();
     

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



More information about the Pkg-javascript-commits mailing list