Skip to content

Commit f3c10c9

Browse files
author
Rami Bououni
committed
npm cmds
1 parent 24e1283 commit f3c10c9

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

docs/artifacts/get-started-npm.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ monikerRange: '>= azure-devops-2020'
99
"recommendations": "true"
1010
---
1111

12-
# Get started with managing npm packages in Azure Artifacts
12+
# Publish and download npm packages with Azure Artifacts
1313

1414
[!INCLUDE [version-gt-eq-2020](../includes/version-gt-eq-2020.md)]
1515

@@ -86,33 +86,39 @@ This setup lets you to share your configuration file without exposing your crede
8686
> [!IMPORTANT]
8787
> npm supports only a single `registry` setting in your *.npmrc* file. To use multiple registries, you must use [upstream sources](npm/upstream-sources.md) or [scopes](npm/scopes.md).
8888
89-
## Publish packages
89+
## Publish packages to your feed
9090

91-
Run the following command in your project directory to publish your npm packages:
91+
To successfully run the publish command, you must first authenticate with your feed. If you haven’t done this yet, follow the steps in the [Connect to a feed](connect-to-a-feed) section then continue with the instructions below.
9292

93-
```Command
94-
npm publish
95-
```
93+
1. In your project directory, run the following command to publish the npm package defined in your *package.json*:
94+
95+
```
96+
npm publish
97+
```
9698
9799
> [!IMPORTANT]
98-
> Using the `publishConfig` property to override the registry config param at publish-time is not supported.
100+
> Using the `publishConfig` property to override the registry configuration at publish time is not supported.
101+
102+
## Restore packages from your feed
103+
104+
To successfully run the restore command, you must first authenticate with your feed. If you haven’t done this yet, follow the steps in the [Connect to a feed](connect-to-a-feed) section then continue with the instructions below.
105+
106+
1. In your project directory, run the following command to restore all npm packages:
99107
100-
## Restore packages
108+
```
109+
npm install
110+
```
101111
102-
Run the following command in your project directory to restore your npm packages:
112+
1. To restore a specific npm package, run the following command from your project directory:
103113
104-
```Command
105-
npm install
106-
```
114+
```
115+
npm install --save <PACKAGE_NAME>
116+
```
107117
108-
To restore a specific npm package, run the following command from your project directory:
118+
## Related content
109119
110-
```Command
111-
npm install --save <PACKAGE_NAME>
112-
```
120+
- [Publish npm packages with Azure Pipelines (YAML/Classic)](../pipelines/artifacts/npm.md)
113121
114-
## Related articles
122+
- [Use packages from npmjs.com](npm/upstream-sources.md)
115123
116-
- [Publish npm packages (YAML/Classic)](../pipelines/artifacts/npm.md)
117-
- [Use packages from npmjs.com](./npm/upstream-sources.md)
118-
- [Use npm scopes](npm/scopes.md)
124+
- [Use npm audit](npm/npm-audit.md)

0 commit comments

Comments
 (0)