Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-04-29 02:02:55 +0400
committerisaacs <i@izs.me>2011-04-29 02:02:55 +0400
commitb5c97c8b5317bce157bb1d7bd8667104c069a91f (patch)
tree3147b157bec05aaa8ef109b9a13aefb554863856
parentb91a175cb794d24c5ad4d0b6e5071147fa758209 (diff)
helpful comments in a tricky conditional
-rw-r--r--lib/build.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/build.js b/lib/build.js
index 52cf13dfd..2746bae9b 100644
--- a/lib/build.js
+++ b/lib/build.js
@@ -80,8 +80,12 @@ function rebuildBundles (pkg, folder, parent, gtop, cb) {
log.verbose(files, "rebuildBundles")
asyncMap(files.filter(function (file) {
+ // rebuild if:
+ // not a .folder, like .bin or .hooks
return file.charAt(0) !== "."
+ // not some old 0.x style bundle
&& file.indexOf("@") === -1
+ // either not a dep, or explicitly bundled
&& (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1)
}).map(function (file) {
return path.resolve(folder, "node_modules", file)