Skip to content

Commit 039df44

Browse files
author
Rami Bououni
committed
updates
1 parent 2cf67f0 commit 039df44

File tree

2 files changed

+20
-46
lines changed

2 files changed

+20
-46
lines changed

docs/artifacts/npm/publish.md

+15-41
Original file line numberDiff line numberDiff line change
@@ -22,61 +22,35 @@ This article guides you through authenticating with your Azure Artifacts feed an
2222
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2323
| **Azure DevOps** | - An Azure DevOps [organization](../../organizations/accounts/create-organization.md).<br>- An Azure DevOps [project](../../organizations/projects/create-project.md).<br> - An Azure Artifacts [feed](../get-started-nuget.md#create-feed).<br> - [Download and install Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). |
2424

25-
## Connect to Feed
25+
## Get the tools
2626

27-
::: moniker range="azure-devops"
27+
If this is your first time using Azure Artifacts with npm on your machine, follow the steps below to set up your environment:
2828

29-
1. Sign in to your Azure DevOps organization, and then navigate to your project.
29+
### [Windows](#tab/windows/)
3030

31-
1. Select **Artifacts**, and then select your feed from the dropdown menu.
31+
1. Download [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
3232

33-
1. Select **Connect to Feed**, and then select **npm** from the left navigation area.
33+
1. Run the following command to install `vsts-npm-auth`.
3434

35-
1. Follow the instructions in the **Project setup** section to configure your *.npmrc* file and connect to your feed.
36-
37-
:::image type="content" source="../npm/media/project-setup-npm.png" alt-text="Screenshot that shows how to connect to a feed in Azure DevOps services." lightbox="../npm/media/project-setup-npm.png":::
38-
39-
::: moniker-end
40-
41-
::: moniker range="< azure-devops"
42-
43-
1. Sign in to your Azure DevOps collection, and then navigate to your project.
44-
45-
2. Select **Artifacts**, and then select your feed from the dropdown menu.
46-
47-
3. Select **Connect to Feed**, and then select **npm** from the left navigation area.
48-
49-
::: moniker-end
50-
51-
::: moniker range="azure-devops-2022"
52-
53-
4. Follow the instructions in the **Project setup** section to connect to your feed.
54-
55-
:::image type="content" source="../media/npm-project-setup-server-2022-1.png" alt-text="A screenshot that shows how to connect to your feed in Azure DevOps Server 2022.":::
56-
57-
::: moniker-end
58-
59-
::: moniker range="azure-devops-2020"
60-
61-
4. Follow the instructions in the **Project setup** section to connect to your feed.
62-
63-
:::image type="content" source="../media/npm-project-setup-server-2020-1.png" alt-text="A screenshot that shows how to connect to your feed in Azure DevOps Server 2020.":::
35+
```
36+
npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false
37+
```
6438
65-
::: moniker-end
39+
### [Other](#tab/other/)
6640
67-
::: moniker range="azure-devops-2019"
41+
1. Download [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
6842
69-
4. Follow the provided instructions to set up your project and connect to your feed.
70-
71-
:::image type="content" source="../media/npm-project-setup-server-2019-1.png" alt-text="A screenshot that shows how to connect to your feed in Azure DevOps Server 2019.":::
43+
1. Create a [Personal Access Token](../../organizations/accounts/use-personal-access-tokens-to-authenticate.md#create-a-pat) with **Packaging** > **Read & write** scope.
7244
73-
::: moniker-end
45+
---
7446
7547
## Publish packages
7648
49+
1. If you haven't authenticated with your feed yet, follow the steps in the [Project setup](npmrc.md#connect-to-feed) to connect to your feed and then proceed with the next step once you're done.
50+
7751
1. Run the following command in your project directory to publish the npm packages listed in your *package.json*:
7852
79-
```Cli
53+
```
8054
npm publish
8155
```
8256

docs/artifacts/toc.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
- name: Project setup
8888
href: npm/npmrc.md
8989
displayName: publish, npm
90-
- name: Publish and restore npm packages (CLI)
90+
- name: Publish npm packages
9191
href: npm/publish.md
92-
displayName: npm, publish, restore, cli
92+
displayName: npm, publish, cli
9393
- name: Npm scopes
9494
href: npm/scopes.md
9595
displayName: npm scope, npm artifacts, npm packages
@@ -152,9 +152,9 @@
152152
- name: Project setup
153153
href: npm/npmrc.md
154154
displayName: npmrc, connect, feed, npm
155-
- name: Publish and restore npm packages (CLI)
156-
href: npm/publish.md
157-
displayName: npm, publish, restore, cli
155+
- name: Restore npm packages
156+
href: npm/restore-npm-packages.md
157+
displayName: npm, restore, cli
158158
- name: Npm scopes
159159
href: npm/scopes.md
160160
displayName: npm scope, npm artifacts, npm packages

0 commit comments

Comments
 (0)