Skip to content

Commit 333a376

Browse files
markphipgithub-actions
andauthored
Automated documentation update [skip ci] (#26)
Co-authored-by: github-actions <github-actions@github.com>
1 parent 61cc585 commit 333a376

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

src/artifacts-helper/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,27 @@ Configures Codespace to authenticate with Azure Artifact feeds
1919
| dotnet6 | Use .NET 6 Runtime | boolean | false |
2020
| dotnetAlias | Create alias for dotnet | boolean | true |
2121
| nugetAlias | Create alias for nuget | boolean | true |
22+
| npmAlias | Create alias for npm | boolean | true |
23+
| yarnAlias | Create alias for yarn | boolean | true |
2224

2325
This installs [Azure Artifacts Credential Provider](https://github.com/microsoft/artifacts-credprovider)
24-
and optionally configures an alias for `dotnet` and `nuget` that dynamically sets an authentication token
26+
and optionally configures an alias for `dotnet`, `nuget`, `npm`, and `yarn` that dynamically sets an authentication token
2527
for pulling artifacts from a feed before running the command.
2628

29+
For `npm` and `yarn` this requires that your `~/.npmrc` file is configured to use the ${ARTIFACTS_ACCESSTOKEN}
30+
environment variable for the password. A helper script has been added that you can use to write your `~/.npmrc`
31+
file during your setup process, though there are many ways you could accomplish this. To use the script, run it like
32+
this:
33+
34+
```
35+
write-npm.sh pkgs.dev.azure.com/orgname/projectname/_packaging/feed1/npm
36+
write-npm.sh pkgs.dev.azure.com/orgname/projectname/_packaging/feed2/npm username
37+
write-npm.sh pkgs.dev.azure.com/orgname/projectname/_packaging/feed3/npm username email
38+
```
39+
40+
You must pass the feed name to the script, but you can optionally provide a username and email if desired. Defaults
41+
are put in place if they are not provided.
42+
2743
## OS Support
2844

2945
This feature is tested to work on Debian/Ubuntu and Mariner CBL 2.0

0 commit comments

Comments
 (0)