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-27 05:06:40 +0400
committerisaacs <i@izs.me>2011-04-27 05:06:40 +0400
commite9b1c2a21dd7d666c046a321c4167b345e699528 (patch)
treec0fb1222be93d63b9e80a2e6a0807bf920d0babb /lib/utils/read-json.js
parent08e287c6267838ac2de457a9822ed694e5b29024 (diff)
Close #843 install dev-deps locally
When installing or linking at the top-level, install the devDependencies, since that's typically done in a development folder.
Diffstat (limited to 'lib/utils/read-json.js')
-rw-r--r--lib/utils/read-json.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/read-json.js b/lib/utils/read-json.js
index 1c18e7b14..c2bd2a0cf 100644
--- a/lib/utils/read-json.js
+++ b/lib/utils/read-json.js
@@ -230,10 +230,12 @@ function processObject (opts, cb) { return function (er, json) {
json.devDependencies = json["dev-dependencies"]
delete json["dev-dependencies"]
}
+
;["dependencies", "devDependencies"].forEach(function (d) {
json[d] = json[d] ? depObjectify(json[d]) : {}
})
- if (npm.config.get("dev") || npm.config.get("npat")) {
+
+ if (opts.dev || npm.config.get("dev") || npm.config.get("npat")) {
Object.keys(json.devDependencies || {}).forEach(function (d) {
json.dependencies[d] = json.devDependencies[d]
})