module-deps
Advanced tools
Comparing version 0.8.0 to 0.9.0
11
index.js
@@ -13,2 +13,3 @@ var fs = require('fs'); | ||
if (!opts) opts = {}; | ||
var cache = opts.cache; | ||
@@ -22,3 +23,2 @@ if (!Array.isArray(mains)) mains = [ mains ].filter(Boolean); | ||
var pending = 0; | ||
var cache = {}; | ||
@@ -34,3 +34,5 @@ var output = through(); | ||
if (mains.length === 0) { | ||
process.nextTick(output.queue.bind(output, null)); | ||
output.pause(); | ||
output.queue(null); | ||
process.nextTick(function () { output.resume() }); | ||
} | ||
@@ -70,3 +72,6 @@ | ||
fs.readFile(file, 'utf8', function (err, src) { | ||
if (cache && cache[file]) { | ||
applyTransforms(file, trx, cache[file]); | ||
} | ||
else fs.readFile(file, 'utf8', function (err, src) { | ||
if (err) return output.emit('error', err); | ||
@@ -73,0 +78,0 @@ applyTransforms(file, trx, src); |
{ | ||
"name": "module-deps", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "walk the dependency graph to generate json output that can be fed into browser-pack", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
20774
435
139