The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.
Please select the desired protocol below to get the URL.
This URL has Read-Only access.
main_repo / deps / npm / man / man1 / dedupe.1 @ 5aef65a9
History | View | Annotate | Download (1.6 KB)
1 |
.\" Generated with Ronnjs 0.3.8 |
---|---|
2 |
.\" http://github.com/kapouer/ronnjs/ |
3 |
. |
4 |
.TH "NPM\-DEDUPE" "1" "February 2013" "" "" |
5 |
. |
6 |
.SH "NAME" |
7 |
\fBnpm-dedupe\fR \-\- Reduce duplication |
8 |
. |
9 |
.SH "SYNOPSIS" |
10 |
. |
11 |
.nf |
12 |
npm dedupe [package names\.\.\.] |
13 |
. |
14 |
.fi |
15 |
. |
16 |
.SH "DESCRIPTION" |
17 |
Searches the local package tree and attempts to simplify the overall |
18 |
structure by moving dependencies further up the tree, where they can |
19 |
be more effectively shared by multiple dependent packages\. |
20 |
. |
21 |
.P |
22 |
For example, consider this dependency graph: |
23 |
. |
24 |
.IP "" 4 |
25 |
. |
26 |
.nf |
27 |
a |
28 |
+\-\- b <\-\- depends on c@1\.0\.x |
29 |
| `\-\- c@1\.0\.3 |
30 |
`\-\- d <\-\- depends on c@~1\.0\.9 |
31 |
`\-\- c@1\.0\.10 |
32 |
. |
33 |
.fi |
34 |
. |
35 |
.IP "" 0 |
36 |
. |
37 |
.P |
38 |
In this case, \fBnpm help dedupe\fR will transform the tree to: |
39 |
. |
40 |
.IP "" 4 |
41 |
. |
42 |
.nf |
43 |
a |
44 |
+\-\- b |
45 |
+\-\- d |
46 |
`\-\- c@1\.0\.10 |
47 |
. |
48 |
.fi |
49 |
. |
50 |
.IP "" 0 |
51 |
. |
52 |
.P |
53 |
Because of the hierarchical nature of node\'s module lookup, b and d |
54 |
will both get their dependency met by the single c package at the root |
55 |
level of the tree\. |
56 |
. |
57 |
.P |
58 |
If a suitable version exists at the target location in the tree |
59 |
already, then it will be left untouched, but the other duplicates will |
60 |
be deleted\. |
61 |
. |
62 |
.P |
63 |
If no suitable version can be found, then a warning is printed, and |
64 |
nothing is done\. |
65 |
. |
66 |
.P |
67 |
If any arguments are supplied, then they are filters, and only the |
68 |
named packages will be touched\. |
69 |
. |
70 |
.P |
71 |
Note that this operation transforms the dependency tree, and may |
72 |
result in packages getting updated versions, perhaps from the npm |
73 |
registry\. |
74 |
. |
75 |
.P |
76 |
This feature is experimental, and may change in future versions\. |
77 |
. |
78 |
.SH "SEE ALSO" |
79 |
. |
80 |
.IP "\(bu" 4 |
81 |
npm help ls |
82 |
. |
83 |
.IP "\(bu" 4 |
84 |
npm help update |
85 |
. |
86 |
.IP "\(bu" 4 |
87 |
npm help install |
88 |
. |
89 |
.IP "" 0 |
90 |
|