Dijelite putem


Npm@0 - npm v0 task

Use this task to install and publish npm packages or to run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.

Note

The npm Authenticate task is the recommended way to authenticate with Azure Artifacts. This task no longer takes new features and only critical bugs are addressed.

Inputs

cwd - working folder
string.

Specifies the working directory where the npm command is run. Defaults to the root of the repo.


command - npm command
string. Required. Default value: install.

Specifies the command and arguments, which are passed to npm for execution.

If your arguments contain double quotes ("), escape them with a slash (\), and surround the escaped string with double quotes (").


arguments - arguments
string.

The additional arguments that are passed to npm.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Note

The Project Collection Build Service and your project's Build Service identity must be set to Contributor to publish your packages to a feed using Azure Pipelines. See Add new users/groups for more details.

Where can I learn npm commands and arguments?

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands Self-hosted agents must have capabilities that match the following demands to run jobs that use this task: npm
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.91.0 or greater
Task category Package