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: use git+https in package.com url examples #7615

Merged
merged 1 commit into from
Jun 27, 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
18 changes: 9 additions & 9 deletions docs/lib/content/configuring-npm/package-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,11 @@ feature to install the "npm" executable.)
To use this, supply a `bin` field in your package.json which is a map of
command name to local file name. When this package is installed globally,
that file will be either linked inside the global bins directory or
a cmd (Windows Command File) will be created which executes the specified
a cmd (Windows Command File) will be created which executes the specified
file in the `bin` field, so it is available to run by `name` or `name.cmd` (on
Windows PowerShell). When this package is installed as a dependency in another
Windows PowerShell). When this package is installed as a dependency in another
package, the file will be linked where it will be available to that package
either directly by `npm exec` or by name in other scripts when invoking them
either directly by `npm exec` or by name in other scripts when invoking them
via `npm run-script`.


Expand All @@ -385,10 +385,10 @@ For example, myapp could have this:
}
```

So, when you install myapp, in case of unix-like OS it'll create a symlink
from the `cli.js` script to `/usr/local/bin/myapp` and in case of windows it
So, when you install myapp, in case of unix-like OS it'll create a symlink
from the `cli.js` script to `/usr/local/bin/myapp` and in case of windows it
will create a cmd file usually at `C:\Users\{Username}\AppData\Roaming\npm\myapp.cmd`
which runs the `cli.js` script.
which runs the `cli.js` script.

If you have a single executable, and its name should be the name of the
package, then you can just supply it as a string. For example:
Expand Down Expand Up @@ -518,7 +518,7 @@ Do it like this:
{
"repository": {
"type": "git",
"url": "https://github.com/npm/cli.git"
"url": "git+https://github.com/npm/cli.git"
}
}
```
Expand Down Expand Up @@ -553,8 +553,8 @@ which it lives:
{
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-dom"
"url": "git+https://github.com/npm/cli.git",
"directory": "workspaces/libnpmpublish"
}
}
```
Expand Down
Loading