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:
authorgnerkus <ifeanyioraelosi@gmail.com>2016-02-09 22:07:55 +0300
committerKat Marchán <kzm@sykosomatic.org>2016-03-04 02:08:20 +0300
commita407ca2bcf6a05117e55cf2ab69376e09094995e (patch)
tree7f703555522a0968a5bc5f3c5335ff65c3ca92f6
parent2c851a231afd874baa77c42ea5ba539c454ac79c (diff)
doc: update documentation for bundledDependencies
PR-URL: https://github.com/npm/npm/pull/11483 Credit: @gnerkus Reviewed-By: @iarna
-rw-r--r--doc/files/package.json.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/files/package.json.md b/doc/files/package.json.md
index 129d99d26..f8c300685 100644
--- a/doc/files/package.json.md
+++ b/doc/files/package.json.md
@@ -576,7 +576,23 @@ this. If you depend on features introduced in 1.5.2, use `">= 1.5.2 < 2"`.
## bundledDependencies
-Array of package names that will be bundled when publishing the package.
+This defines an array of package names that will be bundled when publishing the package.
+
+In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the `bundledDependencies` array and executing `npm pack`.
+
+For example:
+If we define a package.json like this:
+
+```
+{
+ "name": "awesome-web-framework",
+ "version": "1.0.0",
+ "bundledDependencies": [
+ 'renderized', 'super-streams'
+ ]
+}
+```
+we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`. This file contains the dependencies `renderized` and `super-streams` which can be installed in a new project by executing `npm install awesome-web-framework-1.0.0.tgz`.
If this is spelled `"bundleDependencies"`, then that is also honored.