]> source.dussan.org Git - gitea.git/commitdiff
fix: change npm scope registry (#30964) (#30965)
authorGiteabot <teabot@gitea.io>
Mon, 13 May 2024 16:14:31 +0000 (00:14 +0800)
committerGitHub <noreply@github.com>
Mon, 13 May 2024 16:14:31 +0000 (18:14 +0200)
Backport #30964 by @llxlr

https://docs.npmjs.com/cli/v10/using-npm/scope#associating-a-scope-with-a-registry

Co-authored-by: james yang <yanghongday369@gmail.com>
docs/content/usage/packages/npm.en-us.md
docs/content/usage/packages/npm.zh-cn.md

index 1590b9623a0cd74fe9790891fa824767b7f6a286..ccc075b140683535c04176be8957b497444b2d5a 100644 (file)
@@ -30,7 +30,7 @@ The following examples use the `npm` tool with the scope `@test`.
 To register the package registry you need to configure a new package source.
 
 ```shell
-npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/
+npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/
 npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}"
 ```
 
@@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
 For example:
 
 ```shell
-npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/
+npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/
 npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
 ```
 
index d51b8b78a1e0c38e7b98bbd1a8eb9054bf2a74c3..772cdc08b26716f9380376c8c90bce9e014e2c17 100644 (file)
@@ -30,7 +30,7 @@ menu:
 要注册软件包注册表,您需要配置一个新的软件包源。
 
 ```shell
-npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/
+npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/
 npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}"
 ```
 
@@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
 例如:
 
 ```shell
-npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/
+npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/
 npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
 ```