Permalink
Browse files

Allow bundleDependencies to be a string

  • Loading branch information...
1 parent dc9e69d commit 64ac2a5ce2920d152306adfd683f6aaf10c8b2dc @grncdr committed Mar 31, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/utils/read-json.js
@@ -418,8 +418,9 @@ function processObject (opts, cb) { return function (er, json) {
delete json.bundledDependencies
}
- if (json.bundleDependencies && !Array.isArray(json.bundleDependencies)) {
- var e = new Error("bundleDependencies must be an array.\n"
+ if (json.bundleDependencies && typeof json.bundleDependencies !== "string"
+ && !Array.isArray(json.bundleDependencies)) {
+ var e = new Error("bundleDependencies must be an array or string.\n"
+"See `npm help json`")
if (cb) return cb(e)
throw e

0 comments on commit 64ac2a5

Please sign in to comment.