Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Improve manpage section for package.json funding properties #7582

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions docs/lib/content/configuring-npm/package-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,23 +225,35 @@ npm also sets a top-level "maintainers" field with your npm user info.
### funding

You can specify an object containing a URL that provides up-to-date
information about ways to help fund development of your package, or a
string URL, or an array of these:
information about ways to help fund development of your package, a
string URL, or an array of objects and string URLs:

```json
{
"funding": {
"type" : "individual",
"url" : "http://example.com/donate"
},
}
}
```

```json
{
"funding": {
"type" : "patreon",
"url" : "https://www.patreon.com/my-account"
},
}
}
```

"funding": "http://example.com/donate",
```json
{
"funding": "http://example.com/donate"
}
```

```json
{
"funding": [
{
"type" : "individual",
Expand All @@ -258,7 +270,7 @@ string URL, or an array of these:

Users can use the `npm fund` subcommand to list the `funding` URLs of all
dependencies of their project, direct and indirect. A shortcut to visit
each funding url is also available when providing the project name such as:
each funding URL is also available when providing the project name such as:
`npm fund <projectname>` (when there are multiple URLs, the first one will
be visited)

Expand Down
Loading