Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

watchify

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchify - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

test/bin_standalone.js

26

index.js

@@ -37,2 +37,6 @@ var through = require('through');

});
b.on('file', function (file) {
watchFile(file);
});

@@ -43,9 +47,4 @@ var fwatchers = {};

bundle.on('transform', function (tr, mfile) {
if (!fwatchers[mfile]) fwatchers[mfile] = [];
if (!fwatcherFiles[mfile]) fwatcherFiles[mfile] = [];
watchFile(mfile, mfile);
tr.on('file', function (file) {
watchFile(mfile, file);
watchDepFile(mfile, file);
});

@@ -55,3 +54,16 @@ });

function watchFile(mfile, file) {
function watchFile (file) {
if (fwatchers[file]) return;
if (!fwatchers[file]) fwatchers[file] = [];
if (!fwatcherFiles[file]) fwatcherFiles[file] = [];
var w = chokidar.watch(file, {persistent: true});
w.on('error', b.emit.bind(b, 'error'));
w.on('change', function () {
invalidate(file);
});
fwatchers[file].push(w);
}
function watchDepFile(mfile, file) {
if (!fwatchers[mfile]) return;

@@ -58,0 +70,0 @@ if (fwatcherFiles[mfile].indexOf(file) >= 0) return;

{
"name": "watchify",
"version": "0.8.1",
"version": "0.8.2",
"description": "watch mode for browserify builds",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc