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.

Statistics
| Branch: | Revision:

main_repo / deps / npm / man / man1 / view.1 @ 5aef65a9

History | View | Annotate | Download (3.31 KB)

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