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