This document describes how to store npm artifacts in CODING-AR for centralized artifact management and version control. The following sections introduce how to create an artifact, configure authentication, and pull and push artifacts.
Before you begin:
- Install Node.js.
- Create an artifact repository (see Basic Operations).
- Select npm as the repository type.
You can skip this section if you are familiar with npm artifacts.
Authentication information must be configured before you can pull artifacts from or push artifacts to CODING-AR.
Configure authentication information in either of the following ways:
.npmrcfile in the same directory as your project's
npm configto set the
npm registryto the current artifact repository.
npm loginand enter the account, password, and email address when asked.
Copy and run the push command on the page to push a local artifact to the remote repository.
Copy and run the
npm install command to pull an artifact:
If you try to pull an artifact that does not exist in the CODING private repository, the system will try to pull from the configured proxy. You can add a third-party artifact source to obtain artifacts from the specific repository. Without the need for configuration, CODING will retrieve artifacts in sequence from top to bottom.
<package> with the package name and run the command generated on the page to pull the package.
The artifact and its dependencies will be pulled to the local machine and synchronized to CODING-AR. The package source will be shown on the details page.