diff options
-rw-r--r-- | doc/config.md | 7 | ||||
-rw-r--r-- | lib/build.js | 1 | ||||
-rw-r--r-- | lib/utils/default-config.js | 1 | ||||
-rw-r--r-- | lib/utils/parse-args.js | 3 | ||||
-rw-r--r-- | man1/config.1 | 9 |
5 files changed, 20 insertions, 1 deletions
diff --git a/doc/config.md b/doc/config.md index e717e7e5b..265fc5a95 100644 --- a/doc/config.md +++ b/doc/config.md @@ -81,6 +81,13 @@ doing: Configurations defined on the command line are not saved to the .npmrc file. +### rebuild-bundle + +Default: true + +Set to some truish value to rebuild bundled dependencies after +installation. + ### recursive Default: false diff --git a/lib/build.js b/lib/build.js index dc3c386c2..d12b96605 100644 --- a/lib/build.js +++ b/lib/build.js @@ -66,6 +66,7 @@ function build (args, cb) { } function rebuildBundle (pkg, cb) { + if (!npm.config.get("rebuild-bundle")) return cb() var bundle = path.join( npm.dir, pkg.name, pkg.version , "package", "node_modules") fs.stat(bundle, function (er, s) { diff --git a/lib/utils/default-config.js b/lib/utils/default-config.js index 1e8024463..8d43307b2 100644 --- a/lib/utils/default-config.js +++ b/lib/utils/default-config.js @@ -41,6 +41,7 @@ module.exports = , outfd : stdio.stdoutFD , proxy : process.env.http_proxy || null , prune : undefined // if set to boolean false, then that means "never" + , "rebuild-bundle" : true , recursive : false , registry : "http"+(sslWorks ? "s" : "")+"://registry.npmjs.org/" , root : path.join(process.execPath, "..", "..", "lib", "node") diff --git a/lib/utils/parse-args.js b/lib/utils/parse-args.js index 58022fb0a..57535aba1 100644 --- a/lib/utils/parse-args.js +++ b/lib/utils/parse-args.js @@ -36,6 +36,7 @@ exports.types = , outfd : [Number, Stream] , proxy : url , prune : Boolean + , "rebuild-bundle" : Boolean , recursive : Boolean , registry : url , root : path @@ -66,6 +67,8 @@ exports.shorthands = , r : ["--recursive"] , f : ["--force"] , rf : ["--recursive", "--force"] + , rb : ["--rebuild-bundle"] + , "no-rb" : ["--no-rebuild-bundle"] , desc : ["--description"] , "no-desc" : ["--no-description"] } diff --git a/man1/config.1 b/man1/config.1 index 71155db28..260b9a2fc 100644 --- a/man1/config.1 +++ b/man1/config.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs/v0.1 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-CONFIG" "1" "December 2010" "" "" +.TH "NPM\-CONFIG" "1" "January 2011" "" "" . .SH "NAME" \fBnpm-config\fR \-\- Manage the npm configuration file @@ -124,6 +124,13 @@ npm \-\-key val <command> .P Configurations defined on the command line are not saved to the \.npmrc file\. . +.SS "rebuild\-bundle" +Default: true +. +.P +Set to some truish value to rebuild bundled dependencies after +installation\. +. .SS "recursive" Default: false . |