You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**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). |
24
24
25
-
## Connect to Feed
25
+
## Get the tools
26
26
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:
28
28
29
-
1. Sign in to your Azure DevOps organization, and then navigate to your project.
29
+
### [Windows](#tab/windows/)
30
30
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).
32
32
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`.
34
34
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.":::
1. Download [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
68
42
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.
72
44
73
-
::: moniker-end
45
+
---
74
46
75
47
## Publish packages
76
48
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
+
77
51
1. Run the following command in your project directory to publish the npm packages listed in your *package.json*:
0 commit comments