2022-12-08 17:38:04 +01:00
|
|
|
diff --git a/index.js b/index.js
|
|
|
|
index 0753b9f13d9972c5e79be38dd3e686fbbb23627c..05efb1b1ea52a5e9621a46ad7e2097ee486431d8 100644
|
|
|
|
--- a/index.js
|
|
|
|
+++ b/index.js
|
2021-07-15 19:59:34 +02:00
|
|
|
@@ -58,33 +58,6 @@ function watchify (b, opts) {
|
|
|
|
if (pkgcache) pkgcache[file] = pkg;
|
|
|
|
});
|
2021-10-25 21:56:26 +02:00
|
|
|
|
2021-07-15 19:59:34 +02:00
|
|
|
- b.on('reset', reset);
|
|
|
|
- reset();
|
|
|
|
-
|
|
|
|
- function reset () {
|
|
|
|
- var time = null;
|
|
|
|
- var bytes = 0;
|
|
|
|
- b.pipeline.get('record').on('end', function () {
|
|
|
|
- time = Date.now();
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- b.pipeline.get('wrap').push(through(write, end));
|
|
|
|
- function write (buf, enc, next) {
|
|
|
|
- bytes += buf.length;
|
|
|
|
- this.push(buf);
|
|
|
|
- next();
|
|
|
|
- }
|
|
|
|
- function end () {
|
|
|
|
- var delta = Date.now() - time;
|
|
|
|
- b.emit('time', delta);
|
|
|
|
- b.emit('bytes', bytes);
|
|
|
|
- b.emit('log', bytes + ' bytes written ('
|
|
|
|
- + (delta / 1000).toFixed(2) + ' seconds)'
|
|
|
|
- );
|
|
|
|
- this.push(null);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
var fwatchers = {};
|
|
|
|
var fwatcherFiles = {};
|
|
|
|
var ignoredFiles = {};
|