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

Simplify repository element in npm's project.json to use https URL #1127

Merged
merged 7 commits into from
Dec 3, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ To ensure the repository's URL is correct, replace REPOSITORY with the name of t
{% data variables.product.prodname_registry %} will match the repository based on the URL, instead of based on the package name. If you store the *package.json* file outside the root directory of your repository, you can use the `directory` field to specify the location where {% data variables.product.prodname_registry %} can find the *package.json* files.
jcansdale marked this conversation as resolved.
Show resolved Hide resolved

```shell
"repository" : {
"type" : "git",
"url": "ssh://git@{% if currentVersion == "free-pro-team@latest" %}github.com{% else %}<em>HOSTNAME</em>{% endif %}/<em>OWNER</em>/<em>REPOSITORY</em>.git",
"directory": "packages/name"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It explains the "directory" value in the previous paragraph

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I don't think we need to document the directory value here (it isn't used by GitHub Packages).

},
"repository" : "https://{% if currentVersion == "free-pro-team@latest" %}github.com{% else %}<em>HOSTNAME</em>{% endif %}/<em>OWNER</em>/<em>REPOSITORY</em>",
```

### Installing a package
Expand Down