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>2014-01-19 10:51:51 +0400
committerisaacs <i@izs.me>2014-01-19 10:51:51 +0400
commit1101b6ad8cc601888ac312562c37d4d777edf72a (patch)
treec6b26c2936dca8b05145b190d2d1404d4e0da826 /lib/prune.js
parentac6efbc865dbe98503da77271ad7a8843996fc40 (diff)
Revert "prune: --production option to unbuild devDependencies"
This reverts commit f65da7d7f156fd28db10042a8db6682ef70178a7. See #4509
Diffstat (limited to 'lib/prune.js')
-rw-r--r--lib/prune.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/prune.js b/lib/prune.js
index dbe8790b9..0e13da13b 100644
--- a/lib/prune.js
+++ b/lib/prune.js
@@ -13,19 +13,19 @@ var readInstalled = require("read-installed")
prune.completion = require("./utils/completion/installed-deep.js")
function prune (args, cb) {
+ //check if is a valid package.json file
var jsonFile = path.resolve(npm.dir, "..", "package.json" )
- readJson(jsonFile, log.warn, function (er, packageData) {
+ readJson(jsonFile, log.warn, function (er, data) {
if (er) return cb(er)
+ next()
+ })
+
+ function next() {
readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) {
if (er) return cb(er)
- if (npm.config.get("production")) {
- Object.keys(packageData.devDependencies || {}).forEach(function (k) {
- if (data.dependencies[k]) data.dependencies[k].extraneous = true
- })
- }
prune_(args, data, cb)
})
- })
+ }
}
function prune_ (args, data, cb) {