[Pkg-javascript-commits] [node-module-deps] 171/444: document the transform event

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 a2998702f7b56055038cea8daeaddaddef3aeeeb
Author: James Halliday <mail at substack.net>
Date:   Sat Feb 8 17:04:20 2014 -0800

    document the transform event
---
 readme.markdown | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/readme.markdown b/readme.markdown
index 5cf045d..5959edf 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -54,9 +54,9 @@ usage: module-deps [files]
 var mdeps = require('module-deps')
 ```
 
-## mdeps(files, opts={})
+## var d = mdeps(files, opts={})
 
-Return a readable stream of javascript objects from an array of filenames
+Return a readable stream `d` of javascript objects from an array of filenames
 `files`.
 
 Each file in `files` can be a string filename or a stream.
@@ -88,6 +88,13 @@ this for large dependencies like jquery or threejs which take forever to parse.
 * opts.packageCache - an object mapping filenames to their parent package.json
 contents for browser fields, main entries, and transforms
 
+# events
+
+## d.on('transform', function (tr, file) {})
+
+Every time a transform is applied to a `file`, a `'transform'` event fires with
+the instantiated transform stream `tr`.
+
 # transforms
 
 module-deps can be configured to run source transformations on files before

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