Permalink
Browse files

Add a rebuild-bundle config for Bryan

  • Loading branch information...
1 parent 87d2343 commit 76a635f70204cebfa63c1d325a8ede66b1164d9a @isaacs isaacs committed Jan 5, 2011
Showing with 20 additions and 1 deletion.
  1. +7 −0 doc/config.md
  2. +1 −0 lib/build.js
  3. +1 −0 lib/utils/default-config.js
  4. +3 −0 lib/utils/parse-args.js
  5. +8 −1 man1/config.1
View
7 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
View
1 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) {
View
1 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")
View
3 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"]
}
View
9 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
.

0 comments on commit 76a635f

Please sign in to comment.