Skip to content
eln / 8.1.3-524523bd-0527-48f0-b6f2-eed43432d506

eln 8.1.3-524523bd-0527-48f0-b6f2-eed43432d506

Install from the command line:
Learn more about npm packages
$ npm install @cdd/eln@8.1.3-524523bd-0527-48f0-b6f2-eed43432d506
Install via package.json:
"@cdd/eln": "8.1.3-524523bd-0527-48f0-b6f2-eed43432d506"

About this version

Entry

Installation

To install this package, you need to set up your project to download packages from GitHub Packages. Here is the step-by-step guide:

Personal access token

First, you need to create a personal access token in GitHub.

  • Go to your GitHub Settings (click your profile picture in the top right > Settings)
  • On the left sidebar, click "Developer Settings"
  • Click "Personal access tokens"
  • Click "Generate new token"
  • Give your token a name, and check the box "read:packages"
  • Click "Generate token" at the bottom

NOTE

Be sure to copy the token now. You will not be able to see it again!

.npmrc

Create or modify the .npmrc file in your project root directory (or your home directory, if you want to use it for all your projects). The file should contain the following lines:

registry=https://registry.npmjs.org/
@cdd:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}

Set your environment variable GITHUB_TOKEN to the personal access token you just created. Please note that the environment variable should be set in the environment where npm/yarn commands are run.

Unix-based example:

export GITHUB_TOKEN="your-token-goes-here"

Install the package

Now you are ready to install the package. You can use either yarn or npm:

yarn add @cdd/eln

or

npm install @cdd/eln

Usage

After installation, you can import the package in your JavaScript (or TypeScript) code:

const ElnEntry = require("@cdd/eln");

Or with ES6 import:

import { someFunction } from "@cdd/eln";