在 org 内部:如何发布 npm 包
🕐
公司内部,如何发布 npm private 包
01 生成自己的 github_token
02 添加一个普通的只读 token
.npmrc 示例
@bosinc:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=ghp_this_is_a_pubic_readonly_token03 本地添加 .npmrc
.npmrc 示例
@bosinc:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=ghp_rw_token04 npmConfig 配置
添加 npmConfig 到 package.json
{
"name": "@bosinc/shared",
"version": "0.1.1",
"description": "A react library developed with dumi",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"authors": [
"wgbx"
]
}npm
private
内部
