aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/install
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-09-19 13:48:59 -0700
committerGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-09-19 13:48:59 -0700
commit615beee1ae0fd9b299fc38ac0989d4be5899c19b (patch)
tree907b6e7917421bd203a97b6799cfa19e6cc126eb /docs/guides/install
parentef98a1b76167069e360291b9901ece985c6fa263 (diff)
downloadbun-615beee1ae0fd9b299fc38ac0989d4be5899c19b.tar.gz
bun-615beee1ae0fd9b299fc38ac0989d4be5899c19b.tar.zst
bun-615beee1ae0fd9b299fc38ac0989d4be5899c19b.zip
More improvements to azure guide
Diffstat (limited to 'docs/guides/install')
-rw-r--r--docs/guides/install/azure-artifacts.md18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/guides/install/azure-artifacts.md b/docs/guides/install/azure-artifacts.md
index a317dff43..659e75fd6 100644
--- a/docs/guides/install/azure-artifacts.md
+++ b/docs/guides/install/azure-artifacts.md
@@ -8,17 +8,13 @@ In [Azure Artifact's](https://learn.microsoft.com/en-us/azure/devops/artifacts/n
[Azure Artifacts](https://azure.microsoft.com/en-us/products/devops/artifacts) is a package management system for Azure DevOps. It allows you to host your own private npm registry, npm packages, and other types of packages as well.
-To use it with `bun install`, add a `bunfig.toml` file to your project with the following contents:
-
---
### Configure with bunfig.toml
---
-Make sure to replace `my-azure-artifacts-user` with your Azure Artifacts username, such as `jarred1234`.
-
-Set the `$NPM_PASSWORD` environment variable to your Azure Artifacts npm registry password and Bun will automatically replace it with the correct value. You can also choose not to use an environment variable and instead hardcode your password in the `bunfig.toml` file, but be careful not to commit it to source control.
+To use it with `bun install`, add a `bunfig.toml` file to your project with the following contents. Make sure to replace `my-azure-artifacts-user` with your Azure Artifacts username, such as `jarred1234`.
```toml#bunfig.toml
[install.registry]
@@ -30,13 +26,19 @@ password = "$NPM_PASSWORD"
---
-### Configure with environment variables
+Then assign your Azure Personal Access Token to the the `NPM_PASSWORD` environment variable. Bun [automatically reads](/docs/runtime/env) `.env` files, so create a file called `.env` in your project root. There is no need to base-64 encode this token! Bun will do this for you.
+
+```txt#.env
+NPM_PASSWORD=<paste token here>
+```
---
-You can also use an environment variable to configure Azure Artifacts with `bun install`.
+### Configure with environment variables
+
+---
-Like with the `npm` CLI, the environment variable to use is `NPM_CONFIG_REGISTRY`. The URL should include `:username` and `:_password` as query parameters. Replace `<USERNAME>` and `<PASSWORD>` with the apprropriate values.
+To configure Azure Artifacts without `bunfig.toml`, you can set the `NPM_CONFIG_REGISTRY` environment variable. The URL should include `:username` and `:_password` as query parameters. Replace `<USERNAME>` and `<PASSWORD>` with the apprropriate values.
```bash#shell
NPM_CONFIG_REGISTRY=https://pkgs.dev.azure.com/my-azure-artifacts-user/_packaging/my-azure-artifacts-user/npm/registry/:username=<USERNAME>:_password=<PASSWORD>