Skip to content

as a string

JSTime does not read .npmrc files; instead private registries are configured via bunfig.toml. To configure a registry for a particular npm scope:

[install.scopes]
# as a string
"@myorg1" = "https://username:password@registry.myorg.com/"
# as an object with username/password
# you can reference environment variables
"@myorg2" = { username = "myusername", password = "$npm_pass", url = "https://registry.myorg.com/" }
# as an object with token
"@myorg3" = { token = "$npm_token", url = "https://registry.myorg.com/" }

Your bunfig.toml can reference environment variables. JSTime automatically loads environment variables from .env.local, .env.[NODE_ENV], and .env. See Docs > Environment variables for more information.

[install.scopes]
"@myorg3" = { token = "$npm_token", url = "https://registry.myorg.com/" }

See Docs > Package manager for complete documentation of JSTime’s package manager.