[Pkg-javascript-commits] [node-module-deps] 177/444: emit the transform event in the function case

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:53 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 7844fb674c19bd5f5d825e824474fda2c88d20e1
Author: James Halliday <mail at substack.net>
Date:   Sun Feb 9 18:36:58 2014 -0800

    emit the transform event in the function case
---
 index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 422ab74..ee724a1 100644
--- a/index.js
+++ b/index.js
@@ -284,7 +284,11 @@ module.exports = function (mains, opts) {
     
     function makeTransform (file, tpair, cb) {
         var tr = tpair[0], trOpts = tpair[1];
-        if (typeof tr === 'function') return cb(null, tr(file, trOpts));
+        if (typeof tr === 'function') {
+            var t = tr(file, trOpts);
+            output.emit('transform', t, file);
+            return cb(null, t);
+        }
         
         var params = { basedir: path.dirname(file) };
         nodeResolve(tr, params, function nr (err, res, again) {

-- 
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