温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/docs/pm/scopes-registries
点击访问原文链接

Scopes and registries - Bun

Scopes and registries - BunSkip to main contentBun home pageSearch...⌘KInstall BunSearch...NavigationAdvanced ConfigurationScopes and registriesRuntimePackage ManagerBundlerTest RunnerGuidesReferenceBlogFeedbackdiv:first-child]:!hidden peer-[.is-custom]:[&>div:first-child]:sm:!hidden peer-[.is-custom]:[&>div:first-child]:md:!hidden peer-[.is-custom]:[&>div:first-child]:lg:!hidden peer-[.is-custom]:[&>div:first-child]:xl:!hidden">Core Commandsbun installbun addbun removebun updatebunxPublishing & Analysisbun publishbun outdatedbun whybun auditbun infoWorkspace ManagementWorkspacesCatalogsbun linkbun pmAdvanced Configurationbun patchbun --filterGlobal cacheIsolated installsLockfileLifecycle scriptsScopes and registriesOverrides and resolutionsSecurity Scanner API.npmrc supportOn this page.npmrcAdvanced ConfigurationScopes and registriesCopy pagespan]:line-clamp-1 overflow-hidden group flex items-center py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border px-3 border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5" aria-label="More actions" type="button" id="radix-_R_2shjinpfd9rqaabsnpfdb_" aria-haspopup="menu" aria-expanded="false" data-state="closed">*]:[overflow-wrap:anywhere]">Configure private registries and scoped packages

Copy pagespan]:line-clamp-1 overflow-hidden group flex items-center py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border px-3 border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5" aria-label="More actions" type="button" id="radix-_R_5hjinpfd9rqaabsnpfdb_" aria-haspopup="menu" aria-expanded="false" data-state="closed">The default registry is registry.npmjs.org. This can be globally configured in bunfig.toml: bunfig.tomlCopy[install] # set default registry as a string registry = "https://registry.npmjs.org" # set a token registry = { url = "https://registry.npmjs.org", token = "123456" } # set a username/password registry = "https://username:password@registry.npmjs.org" To configure a private registry scoped to a particular organization: bunfig.tomlCopy[install.scopes] # registry as string "@myorg1" = "https://username:password@registry.myorg.com/" # registry with username/password # you can reference environment variables "@myorg2" = { username = "myusername", password = "$NPM_PASS", url = "https://registry.myorg.com/" } # registry with token "@myorg3" = { token = "$npm_token", url = "https://registry.myorg.com/" } ​.npmrc Bun also reads .npmrc files, learn more.

Was this page helpful?

YesNoSuggest editsRaise issueLifecycle scriptsPreviousOverrides and resolutionsNext⌘IxgithubdiscordyoutubePowered by

智能索引记录