npm: Upgrade to 1.3.17
[platform/upstream/nodejs.git] / deps / npm / man / man1 / npm-view.1
1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
3 .
4 .TH "NPM\-VIEW" "1" "December 2013" "" ""
5 .
6 .SH "NAME"
7 \fBnpm-view\fR \-\- View registry info
8 .
9 .SH "SYNOPSIS"
10 .
11 .nf
12 npm view <name>[@<version>] [<field>[\.<subfield>]\.\.\.]
13 npm v <name>[@<version>] [<field>[\.<subfield>]\.\.\.]
14 .
15 .fi
16 .
17 .SH "DESCRIPTION"
18 This command shows data about a package and prints it to the stream
19 referenced by the \fBoutfd\fR config, which defaults to stdout\.
20 .
21 .P
22 To show the package registry entry for the \fBconnect\fR package, you can do
23 this:
24 .
25 .IP "" 4
26 .
27 .nf
28 npm view connect
29 .
30 .fi
31 .
32 .IP "" 0
33 .
34 .P
35 The default version is "latest" if unspecified\.
36 .
37 .P
38 Field names can be specified after the package descriptor\.
39 For example, to show the dependencies of the \fBronn\fR package at version
40 0\.3\.5, you could do the following:
41 .
42 .IP "" 4
43 .
44 .nf
45 npm view ronn@0\.3\.5 dependencies
46 .
47 .fi
48 .
49 .IP "" 0
50 .
51 .P
52 You can view child field by separating them with a period\.
53 To view the git repository URL for the latest version of npm, you could
54 do this:
55 .
56 .IP "" 4
57 .
58 .nf
59 npm view npm repository\.url
60 .
61 .fi
62 .
63 .IP "" 0
64 .
65 .P
66 This makes it easy to view information about a dependency with a bit of
67 shell scripting\.  For example, to view all the data about the version of
68 opts that ronn depends on, you can do this:
69 .
70 .IP "" 4
71 .
72 .nf
73 npm view opts@$(npm view ronn dependencies\.opts)
74 .
75 .fi
76 .
77 .IP "" 0
78 .
79 .P
80 For fields that are arrays, requesting a non\-numeric field will return
81 all of the values from the objects in the list\.  For example, to get all
82 the contributor names for the "express" project, you can do this:
83 .
84 .IP "" 4
85 .
86 .nf
87 npm view express contributors\.email
88 .
89 .fi
90 .
91 .IP "" 0
92 .
93 .P
94 You may also use numeric indices in square braces to specifically select
95 an item in an array field\.  To just get the email address of the first
96 contributor in the list, you can do this:
97 .
98 .IP "" 4
99 .
100 .nf
101 npm view express contributors[0]\.email
102 .
103 .fi
104 .
105 .IP "" 0
106 .
107 .P
108 Multiple fields may be specified, and will be printed one after another\.
109 For exampls, to get all the contributor names and email addresses, you
110 can do this:
111 .
112 .IP "" 4
113 .
114 .nf
115 npm view express contributors\.name contributors\.email
116 .
117 .fi
118 .
119 .IP "" 0
120 .
121 .P
122 "Person" fields are shown as a string if they would be shown as an
123 object\.  So, for example, this will show the list of npm contributors in
124 the shortened string format\.  (npm help  See \fBpackage\.json\fR for more on this\.)
125 .
126 .IP "" 4
127 .
128 .nf
129 npm view npm contributors
130 .
131 .fi
132 .
133 .IP "" 0
134 .
135 .P
136 If a version range is provided, then data will be printed for every
137 matching version of the package\.  This will show which version of jsdom
138 was required by each matching version of yui3:
139 .
140 .IP "" 4
141 .
142 .nf
143 npm view yui3@\'>0\.5\.4\' dependencies\.jsdom
144 .
145 .fi
146 .
147 .IP "" 0
148 .
149 .SH "OUTPUT"
150 If only a single string field for a single version is output, then it
151 will not be colorized or quoted, so as to enable piping the output to
152 another command\. If the field is an object, it will be output as a JavaScript object literal\.
153 .
154 .P
155 If the \-\-json flag is given, the outputted fields will be JSON\.
156 .
157 .P
158 If the version range matches multiple versions, than each printed value
159 will be prefixed with the version it applies to\.
160 .
161 .P
162 If multiple fields are requested, than each of them are prefixed with
163 the field name\.
164 .
165 .SH "SEE ALSO"
166 .
167 .IP "\(bu" 4
168 npm help search
169 .
170 .IP "\(bu" 4
171 npm help  registry
172 .
173 .IP "\(bu" 4
174 npm help config
175 .
176 .IP "\(bu" 4
177 npm help  config
178 .
179 .IP "\(bu" 4
180 npm help  npmrc
181 .
182 .IP "\(bu" 4
183 npm help docs
184 .
185 .IP "" 0
186