Installing the axe DevTools Linter Connector as an npm package

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

A guide for setting up Agora to easily download and install axe DevTools Linter Connector as an npm package

Free Trial
Not for use with personal data

This article describes how to download and install the axe DevTools Connector using Agora as an npm package registry. Doing so allows you to take advantage of the infrastructure provided by Node.js and npm to download, version, and update your axe DevTools Linter Connector binary, avoiding the manual steps required when you download the Connector directly via the downloads page.

What is Agora?

Agora is Deque's repository (hosted by JFrog as an artifact factory or artifactory), which securely stores binary artifacts (packages, libraries, and executables) and requires an account to access. Agora hosts the axe Linter Connector (both the npm package and the manually downloadable executable).

important

You'll need an Agora account to follow the steps in this article. To obtain one, please contact your Deque representative directly, ask us via our support desk, or send us an email at helpdesk@deque.com. We'll be happy to help you out.

Create an Agora Identity Token

The first step is to create an identity token that npm will use to authenticate your Agora session. Agora identity tokens expire after one year, so they must be recreated annually.

  1. Visit your Agora profile page to obtain an identity token. (If you aren't logged into Agora, you might be redirected to a different landing page than your profile page after you log in. Click the same link a second time after you log in to go to your profile page. Or click the button to the right of the help button in the upper right corner, and then click on Edit Profile.)
  2. Click on Generate an Identity Token.
  3. Add a description to help identify the token in the future. (Optional)
  4. Click on the copy icon to copy the identity token to your clipboard. (You might want to save this identity token in a password manager because you cannot retrieve it again.)

Set Up Your .npmrc

Now that you have an Agora identity token, you can set up your .npmrc file to enable the use of the npm infrastructure for installing the Connector.

  1. Visit the Configuring Access to Agora packages site to create the configuration to paste into your .npmrc file. Note that none of the information on this page is stored or transmitted.
  2. Add your email address (must be the one you are registered with on the Agora site).
  3. Paste your identity token into the corresponding text box.
  4. Click on Generate Configuration to create a configuration and click on the copy icon.
  5. Paste the copied lines into your .npmrc file. The path to the file is specified on the site for Linux, macOS, and Windows.

After following these steps, you can use the axe DevTools Linter Connector npm package.

Example .npmrc

The following is an example of the lines that need to be added to your .npmrc configuration:

@axe-devtools:registry=https://agora.dequecloud.com/artifactory/api/npm/devtools-npm/
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:_auth="am9obmRvZUBleGFtcGxlLmNvbTpUaGlzIGlzbid0IGEgdmFsaWQgaWRlbnRpdHkgdG9rZW4K"
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:email=johndoe@example.com
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:always-auth=true

The value included with _auth is the base64 encoding of <email>:<identity-token>.

tip

You can use _authToken with your identity token instead of using the base64 encoded value of email:identity-token as is required with _auth. For example:

//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:_authToken="VGhpcyBpc24ndCBhIHZhbGlkIGlkZW50aXR5IHRva2VuCg=="

Installing and Using

You can install the latest version of the axe DevTools Connector with:

npm install @axe-devtools/axe-linter-connector -g

This command installs the Connector globally. Check the installation by using the --version option:

axe-linter-connector --version

Next Steps