Socket
Socket
Sign inDemoInstall

gulp-watch-jade

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-watch-jade - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

23

index.js
'use strict';
var path = require('path');
var fs = require('fs');
var glob = require('glob');
var es = require('event-stream');

@@ -53,5 +55,26 @@ var vinyl = require('vinyl-file');

var mtime_cache = {};
stream = es.through(function (file) {
var abs_path = path.resolve(file.path);
try {
// Prevent unchanged files from triggering
var mtime = fs.statSync(abs_path).mtime.getTime();
var last_mtime = mtime_cache[abs_path];
mtime_cache[abs_path] = mtime;
if (last_mtime === mtime) {
return;
}
if (!last_mtime) {
// Initial scan, skip dependency graph
add_file(abs_path, file);
return;
}
} catch (e) {
// File might be gone.
}
add_file(abs_path, file);
dependency.file_changed(abs_path);

@@ -58,0 +81,0 @@ dependency.find_dependents(abs_path).map(add_path);

3

package.json
{
"name": "gulp-watch-jade",
"description": "Find jade files that are affected by dependencies for use with gulp-watch",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/lishid/gulp-watch-jade",

@@ -18,2 +18,3 @@ "repository": "git://github.com/lishid/gulp-watch-jade.git",

"event-stream": "^3.3.2",
"glob": "^7.0.3",
"jade-dependency": "^1.0.1",

@@ -20,0 +21,0 @@ "vinyl-file": "^2.0.0"

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