Skip to content

Commit d35ed4e

Browse files
authored
Merge pull request #1127 from github/repository-https
Simplify repository element in npm's project.json to use https URL
2 parents db160b3 + 39b1dc6 commit d35ed4e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

content/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,10 @@ To publish multiple packages to the same repository, you can include the URL of
131131
132132
To ensure the repository's URL is correct, replace REPOSITORY with the name of the repository containing the package you want to publish, and OWNER with the name of the user or organization account on {% data variables.product.prodname_dotcom %} that owns the repository.
133133
134-
{% 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.
134+
{% data variables.product.prodname_registry %} will match the repository based on the URL, instead of based on the package name.
135135
136136
```shell
137-
"repository" : {
138-
"type" : "git",
139-
"url": "ssh://git@{% if currentVersion == "free-pro-team@latest" %}github.com{% else %}<em>HOSTNAME</em>{% endif %}/<em>OWNER</em>/<em>REPOSITORY</em>.git",
140-
"directory": "packages/name"
141-
},
137+
"repository":"https://{% if currentVersion == "free-pro-team@latest" %}github.com{% else %}<em>HOSTNAME</em>{% endif %}/<em>OWNER</em>/<em>REPOSITORY</em>",
142138
```
143139
144140
### Installing a package

0 commit comments

Comments
 (0)