Permalink
Browse files

Revert "prune: --production option to unbuild devDependencies"

This reverts commit f65da7d.

See #4509
  • Loading branch information...
1 parent ac6efbc commit 1101b6ad8cc601888ac312562c37d4d777edf72a @isaacs isaacs committed Jan 19, 2014
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/prune.js
View
@@ -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) {

0 comments on commit 1101b6a

Please sign in to comment.