diff options
author | isaacs <i@izs.me> | 2011-01-25 05:07:16 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-01-25 05:07:16 +0300 |
commit | 38cc2f35bf2be531080e6b11f646954f98165588 (patch) | |
tree | 5e715dab8753b51b77c4992f1c9a78250d9ea453 | |
parent | 41c8065abf09f1b87ea2cf46248a006ed4fa3261 (diff) |
Fix #525. Make url deps work in bundle
-rw-r--r-- | lib/bundle.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundle.js b/lib/bundle.js index a130c1e54..106c6a601 100644 --- a/lib/bundle.js +++ b/lib/bundle.js @@ -10,6 +10,7 @@ var npm = require("../npm") , fs = require("./utils/graceful-fs") , conf = require("./utils/ini").configList , rm = require("./utils/rm-rf") + , url = require("url") , notAllowed = [ "adduser", "build", "bundle", "config", "init", "link" , "owner", "publish", "restart", "start", "stop", "tag" , "unpublish", "update-dependents", "view", "bn" ] @@ -93,6 +94,10 @@ function install (data, location, cb) { , deps = depNames.map(function (d) { var v = data.dependencies[d] if (v === "*") v = "" + var u = url.parse(v) + if (u && u.protocol && u.host) { + return u.href + } return v ? d + "@" + v : d }) log.verbose(deps, "bundle deps") |