Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow bundleDependencies to be a string

  • Loading branch information...
commit 64ac2a5ce2920d152306adfd683f6aaf10c8b2dc 1 parent dc9e69d
Stephen Sugden authored March 30, 2012

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  lib/utils/read-json.js
5  lib/utils/read-json.js
@@ -418,8 +418,9 @@ function processObject (opts, cb) { return function (er, json) {
418 418
     delete json.bundledDependencies
419 419
   }
420 420
 
421  
-  if (json.bundleDependencies && !Array.isArray(json.bundleDependencies)) {
422  
-    var e = new Error("bundleDependencies must be an array.\n"
  421
+  if (json.bundleDependencies && typeof json.bundleDependencies !== "string"
  422
+			&& !Array.isArray(json.bundleDependencies)) {
  423
+    var e = new Error("bundleDependencies must be an array or string.\n"
423 424
                      +"See `npm help json`")
424 425
     if (cb) return cb(e)
425 426
     throw e

0 notes on commit 64ac2a5

Please sign in to comment.
Something went wrong with that request. Please try again.