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:
authorRebecca Turner <me@re-becca.org>2015-06-18 19:59:27 +0300
committerRebecca Turner <me@re-becca.org>2015-06-26 03:27:30 +0300
commit8fb8b4a047e74ae06248e424874aa704c871b249 (patch)
tree1d4e65421c800cba85ed1338a0703b2fdd5fd48b /lib/install.js
parent3cdbce36758ac2da6dd5a002664ac162f5380792 (diff)
install: Move more npm config into the installer object
Diffstat (limited to 'lib/install.js')
-rw-r--r--lib/install.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/install.js b/lib/install.js
index 9a290f6aa..3b869203a 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -191,7 +191,7 @@ function Installer (where, dryrun, args) {
this.noPackageJsonOk = !!args.length
this.topLevelLifecycles = !args.length
this.npat = npm.config.get('npat')
- this.dev = !npm.config.get('production')
+ this.dev = npm.config.get('dev') || !npm.config.get('production')
this.rollback = npm.config.get('rollback')
this.link = npm.config.get('link')
}
@@ -313,8 +313,6 @@ Installer.prototype.loadAllDepsIntoIdealTree = function (cb) {
log.silly('install', 'loadAllDepsIntoIdealTree')
var saveDeps = getSaveType(this.args)
- var dev = npm.config.get('dev') || !npm.config.get('production')
-
var cg = this.progress.loadAllDepsIntoIdealTree
var installNewModules = !!this.args.length
var steps = []
@@ -327,7 +325,7 @@ Installer.prototype.loadAllDepsIntoIdealTree = function (cb) {
} else {
steps.push(
[loadDeps, this.idealTree, cg.newGroup('loadDeps')])
- if (dev) {
+ if (this.dev) {
steps.push(
[loadDevDeps, this.idealTree, cg.newGroup('loadDevDeps')])
}