[Pkg-javascript-commits] [node-module-deps] 68/444: filter files you don't want to bundle

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:44 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 54e2afef4fc79d194798d970b79c34ec8c46dea5
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Wed Apr 24 14:41:33 2013 +0100

    filter files you don't want to bundle
---
 index.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/index.js b/index.js
index d2d06f6..f4d7f4b 100644
--- a/index.js
+++ b/index.js
@@ -51,6 +51,9 @@ module.exports = function (mains, opts) {
             return pkg;
         };
         
+        if(opts.filter && !opts.filter(id))
+            return cb(false);
+        
         resolve(id, parent, function (err, file) {
             if (err) return output.emit('error', err);
             if (!file) return output.emit('error', new Error([

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