]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/doc/cli/npm-view.md
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / doc / cli / npm-view.md
1 npm-view(1) -- View registry info
2 =================================
3
4 ## SYNOPSIS
5
6     npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
7     npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
8
9 ## DESCRIPTION
10
11 This command shows data about a package and prints it to the stream
12 referenced by the `outfd` config, which defaults to stdout.
13
14 To show the package registry entry for the `connect` package, you can do
15 this:
16
17     npm view connect
18
19 The default version is "latest" if unspecified.
20
21 Field names can be specified after the package descriptor.
22 For example, to show the dependencies of the `ronn` package at version
23 0.3.5, you could do the following:
24
25     npm view ronn@0.3.5 dependencies
26
27 You can view child fields by separating them with a period.
28 To view the git repository URL for the latest version of npm, you could
29 do this:
30
31     npm view npm repository.url
32
33 This makes it easy to view information about a dependency with a bit of
34 shell scripting.  For example, to view all the data about the version of
35 opts that ronn depends on, you can do this:
36
37     npm view opts@$(npm view ronn dependencies.opts)
38
39 For fields that are arrays, requesting a non-numeric field will return
40 all of the values from the objects in the list.  For example, to get all
41 the contributor names for the "express" project, you can do this:
42
43     npm view express contributors.email
44
45 You may also use numeric indices in square braces to specifically select
46 an item in an array field.  To just get the email address of the first
47 contributor in the list, you can do this:
48
49     npm view express contributors[0].email
50
51 Multiple fields may be specified, and will be printed one after another.
52 For exampls, to get all the contributor names and email addresses, you
53 can do this:
54
55     npm view express contributors.name contributors.email
56
57 "Person" fields are shown as a string if they would be shown as an
58 object.  So, for example, this will show the list of npm contributors in
59 the shortened string format.  (See `package.json(5)` for more on this.)
60
61     npm view npm contributors
62
63 If a version range is provided, then data will be printed for every
64 matching version of the package.  This will show which version of jsdom
65 was required by each matching version of yui3:
66
67     npm view yui3@'>0.5.4' dependencies.jsdom
68
69 To show the `connect` package version history, you can do
70 this:
71
72     npm view connect versions
73
74 ## OUTPUT
75
76 If only a single string field for a single version is output, then it
77 will not be colorized or quoted, so as to enable piping the output to
78 another command. If the field is an object, it will be output as a JavaScript object literal.
79
80 If the --json flag is given, the outputted fields will be JSON.
81
82 If the version range matches multiple versions, than each printed value
83 will be prefixed with the version it applies to.
84
85 If multiple fields are requested, than each of them are prefixed with
86 the field name.
87
88 ## SEE ALSO
89
90 * npm-search(1)
91 * npm-registry(7)
92 * npm-config(1)
93 * npm-config(7)
94 * npmrc(5)
95 * npm-docs(1)