broccoli-content-funnel
Advanced tools
Comparing version 0.0.2 to 0.0.3
14
index.js
@@ -9,2 +9,3 @@ 'use strict'; | ||
const realpath = denodeify(fs.realpath); | ||
const lstats = denodeify(fs.lstats); | ||
@@ -41,6 +42,9 @@ class ContentFunnel extends Funnel { | ||
if (item.stats.isSymbolicLink()) { | ||
return realpath(item.path); | ||
return Promise.all([ | ||
realpath(item.path), | ||
lstats(item.path) | ||
]).then(([path, stats]) => ({ path, stats })); | ||
} | ||
return item.path; | ||
}).then(filePath => { | ||
return item; | ||
}).then(item => { | ||
if (item.stats.isDirectory()) { | ||
@@ -50,5 +54,5 @@ return; | ||
if (type === 'function') { | ||
return this.options[option](filePath); | ||
return this.options[option](item.path); | ||
} | ||
return readFile(filePath, 'utf8').then(source => { | ||
return readFile(item.path, 'utf8').then(source => { | ||
if (type === 'string') { | ||
@@ -55,0 +59,0 @@ return source.indexOf(this.options[option]) !== -1; |
{ | ||
"name": "broccoli-content-funnel", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Funnel based on file contents", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4797
70