-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: consolidate docs and help for package spec
Many of our commands parse their args via [npm-package-arg](https://npm.im/npm-package-arg), which is a good standard way of parsing a "package" argument. However the docs surrounding these args are not very consistent. This can lead to confusion in commands such as `npm publish` where the behavior is slightly different than in the past due to this. This add a new help command `npm help package-spec` that describes what this argument is, and can be, and also updates all the commands that interpret their args this with to refer to them as `<package-spec>`. It also adds a link to the new help page on their docs pages.
- Loading branch information
Showing
42 changed files
with
269 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,8 +45,8 @@ In this case, a version `[email protected]` will also be deprecated. | |
You must be the package owner to deprecate something. See the `owner` and | ||
`adduser` help topics. | ||
|
||
To un-deprecate a package, specify an empty string (`""`) for the `message` | ||
argument. Note that you must use double quotes with no space between them to | ||
To un-deprecate a package, specify an empty string (`""`) for the `message` | ||
argument. Note that you must use double quotes with no space between them to | ||
format an empty string. | ||
|
||
### Configuration | ||
|
@@ -82,6 +82,7 @@ password, npm will prompt on the command line for one. | |
|
||
### See Also | ||
|
||
* [package spec](/using-npm/package-spec) | ||
* [npm publish](/commands/npm-publish) | ||
* [npm registry](/using-npm/registry) | ||
* [npm owner](/commands/npm-owner) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,22 +23,22 @@ npm fund [[<@scope>/]<pkg>] | |
|
||
This command retrieves information on how to fund the dependencies of a | ||
given project. If no package name is provided, it will list all | ||
dependencies that are looking for funding in a tree structure, listing the | ||
type of funding and the url to visit. If a package name is provided then it | ||
tries to open its funding url using the `--browser` config param; if there | ||
are multiple funding sources for the package, the user will be instructed | ||
to pass the `--which` option to disambiguate. | ||
dependencies that are looking for funding in a tree structure, listing | ||
the type of funding and the url to visit. If a package name is provided | ||
then it tries to open its funding url using the `--browser` config | ||
param; if there are multiple funding sources for the package, the user | ||
will be instructed to pass the `--which` option to disambiguate. | ||
|
||
The list will avoid duplicated entries and will stack all packages that | ||
share the same url as a single entry. Thus, the list does not have the same | ||
shape of the output from `npm ls`. | ||
share the same url as a single entry. Thus, the list does not have the | ||
same shape of the output from `npm ls`. | ||
|
||
#### Example | ||
|
||
### Workspaces support | ||
|
||
It's possible to filter the results to only include a single workspace and its | ||
dependencies using the `workspace` config option. | ||
It's possible to filter the results to only include a single workspace | ||
and its dependencies using the `workspace` config option. | ||
|
||
#### Example: | ||
|
||
|
@@ -58,8 +58,8 @@ [email protected] | |
`-- [email protected] | ||
``` | ||
|
||
And here is an example of the expected result when filtering only by | ||
a specific workspace `a` in the same project: | ||
And here is an example of the expected result when filtering only by a | ||
specific workspace `a` in the same project: | ||
|
||
```bash | ||
$ npm fund -w a | ||
|
@@ -82,8 +82,8 @@ [email protected] | |
|
||
Whether or not to output JSON data, rather than the normal output. | ||
|
||
* In `npm pkg set` it enables parsing set values with JSON.parse() before | ||
saving them to your `package.json`. | ||
* In `npm pkg set` it enables parsing set values with JSON.parse() | ||
before saving them to your `package.json`. | ||
|
||
Not supported by all npm commands. | ||
|
||
|
@@ -156,6 +156,7 @@ If there are multiple funding sources, which 1-indexed source URL to open. | |
|
||
## See Also | ||
|
||
* [package spec](/using-npm/package-spec) | ||
* [npm install](/commands/npm-install) | ||
* [npm docs](/commands/npm-docs) | ||
* [npm ls](/commands/npm-ls) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.