How to download an NPM package - NextensArelB/SwaggerGenerationTool GitHub Wiki

Where are all the NPM packages located?

The NPM packages can be found under NextensNL-> Artifacts -> Feeds -> KarateNPM (See below) image.png

In order to find the NPM packages relevant to karate, you need to search by the scope. This means that in the search box called "Filter by keywords" you can search for all Karate NPM packages by typing "@nextens-karate" in order to find the relevant scope.

How do I download the package to my visual studio code project?

For this example, let's choose @nextens-karate/karate-ui-auth (However you can choose any package). When the package is selected, the following page is opened:

image.png

On this page you can see the readme with instructions on the package as well as how to install/use it. Before we can start we should have an open karate project (preferably the karate-repo-template with jbang installed). If the karate repo template is still something you don't know how to use. Please feel free to read the following wiki page: https://dev.azure.com/NextensNL/Test%20Automation/_wiki/wikis/Test-Automation.wiki/1564/Jumpstart-with-Karate-the-Karate-template

If you have a karate repo template open, then we can get started. In the root of your project create a new file and call it ".npmrc". In this file, copy in the following lines:

registry=https://pkgs.dev.azure.com/NextensNL/Nextens/_packaging/KarateNPM/npm/registry/

always-auth=true

Then run the following command (in visual studio code terminal) to authenticate yourself and connect to the feed: "vsts-npm-auth -config .npmrc"

Once you have done this, you no longer need to again. Instead now all we need to do is download our package. Copy the command under "Get this package" and paste it into the visual studio code terminal in order to download the npm package.

⚠️ **GitHub.com Fallback** ⚠️