jade-dependency
Advanced tools
Comparing version 1.0.1 to 1.0.2
12
index.js
@@ -21,7 +21,10 @@ 'use strict'; | ||
file_content = fs.readFileSync(abs_path, 'utf8'); | ||
} catch(e) { | ||
// File is probably gone | ||
} catch (e) { | ||
// File might be gone. Let's untrack that file for now. | ||
} | ||
edges.remove_for_x(abs_path); | ||
var dependencies = []; | ||
if (file_content) { | ||
@@ -50,3 +53,2 @@ var parser = new JadeParser(file_content, abs_path, options); | ||
edges.remove_for_x(abs_path); | ||
dependencies.map(function (dependency) { | ||
@@ -75,3 +77,3 @@ edges.add(abs_path, dependency); | ||
function find_dependents(file_path) { | ||
return bfs_dependency(path.resolve(file_path), function(abs_path) { | ||
return bfs_dependency(path.resolve(file_path), function (abs_path) { | ||
return edges.get_for_y(abs_path); | ||
@@ -82,3 +84,3 @@ }); | ||
function find_dependencies(file_path) { | ||
return bfs_dependency(path.resolve(file_path), function(abs_path) { | ||
return bfs_dependency(path.resolve(file_path), function (abs_path) { | ||
return edges.get_for_x(abs_path); | ||
@@ -85,0 +87,0 @@ }); |
{ | ||
"name": "jade-dependency", | ||
"description": "Find jade file dependents (include and extend).", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"homepage": "https://github.com/lishid/jade-dependency", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/lishid/jade-dependency.git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6683