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-03-16 01:02:26 +0300
committerisaacs <i@izs.me>2011-03-22 01:56:10 +0300
commit23605cd5062723bf65a6fcd3e497d80fa4a7a1c2 (patch)
treec84acf0c4cfd1bc47b94b0ac04e430a9a2eadd8e /lib/utils/read-json.js
parentd9f75bca70020a2755a44c633b6bb9ca6d0f00bc (diff)
Closes GH-703 Put devDeps in deps when in dev mode
Diffstat (limited to 'lib/utils/read-json.js')
-rw-r--r--lib/utils/read-json.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/utils/read-json.js b/lib/utils/read-json.js
index 2898a931d..60c211232 100644
--- a/lib/utils/read-json.js
+++ b/lib/utils/read-json.js
@@ -218,6 +218,12 @@ function processObject (opts, cb) { return function (er, json) {
if (!json[d]) return
json[d] = depObjectify(json[d])
})
+ if (npm.config.get("dev")) {
+ Object.keys(json.devDependencies || {}).forEach(function (d) {
+ json.dependencies[d] = json.devDependencies[d]
+ })
+ }
+
json._id = json.name+"@"+json.version
json = testEngine(json)